Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(framework): reliably re-render lists of DOM nodes #1519

Merged
merged 2 commits into from
Apr 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/main/test/specs/ComboBox.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ describe("General interaction", () => {
const input = combo.shadow$("#ui5-combobox-input");
const staticAreaItemClassName = browser.getStaticAreaItemClassName("#combo");
const popover = browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover");
const listItems = popover.$("ui5-list").$$("ui5-li");

input.click();
input.keys("b");
Expand All @@ -40,6 +39,7 @@ describe("General interaction", () => {

assert.strictEqual(selection, "ahrain", "ahrain should be selected");
assert.strictEqual(combo.getProperty("value"), "Bulgaria", "Value should be Bulgaria");
const listItems = popover.$("ui5-list").$$("ui5-li");
assert.ok(listItems[0].getProperty("selected"), "List Item should be selected");

lazy.click();
Expand Down Expand Up @@ -169,4 +169,4 @@ describe("General interaction", () => {
listItems = popover.$("ui5-list").$$("ui5-li");
assert.strictEqual(listItems.length, 0, "Items should be 0");
});
});
});
2 changes: 1 addition & 1 deletion packages/tools/lib/hbs2lit/src/litVisitor2.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function visitEachBlock(block) {
var bParamAdded = false;
visitSubExpression.call(this, block);

this.blocks[this.currentKey()] += "${ repeat(" + normalizePath.call(this, block.params[0].original) + ", undefined, (item, index) => ";
this.blocks[this.currentKey()] += "${ repeat(" + normalizePath.call(this, block.params[0].original) + ", (item, index) => item._id || index, (item, index) => ";
this.paths.push(normalizePath.call(this, block.params[0].original));
this.blockPath = "item";

Expand Down