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

refactor: make selected property in ListMixin use sync: true (#8594) (CP: 24.5) #8602

Closed
wants to merge 1 commit into from
Closed
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
1 change: 1 addition & 0 deletions packages/a11y-base/src/list-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const ListMixin = (superClass) =>
type: Number,
reflectToAttribute: true,
notify: true,
sync: true,
},

/**
Expand Down
2 changes: 0 additions & 2 deletions packages/a11y-base/test/list-mixin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,6 @@ const runTests = (defineHelper, baseMixin) => {

it('should reset previously selected item when listbox and items are disabled', async () => {
list.selected = 3;
await nextUpdate(list);
expect(items[3].selected).to.be.true;

list.disabled = true;
Expand All @@ -788,7 +787,6 @@ const runTests = (defineHelper, baseMixin) => {

it('should restore previously selected item when listbox becomes re-enabled', async () => {
list.selected = 3;
await nextUpdate(list);

list.disabled = true;
items.forEach((item) => {
Expand Down
2 changes: 2 additions & 0 deletions packages/select/test/select-lit.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import '@vaadin/item/vaadin-lit-item.js';
import '@vaadin/list-box/vaadin-lit-list-box.js';
import './not-animated-styles.js';
import '../src/vaadin-lit-select.js';
import './select.common.js';
2 changes: 2 additions & 0 deletions packages/select/test/select-polymer.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import '@vaadin/item/vaadin-item.js';
import '@vaadin/list-box/vaadin-list-box.js';
import './not-animated-styles.js';
import '../src/vaadin-select.js';
import './select.common.js';
2 changes: 0 additions & 2 deletions packages/select/test/select.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import {
tab,
} from '@vaadin/testing-helpers';
import sinon from 'sinon';
import '@vaadin/item/vaadin-item.js';
import '@vaadin/list-box/vaadin-list-box.js';
import { html, render } from 'lit';

describe('vaadin-select', () => {
Expand Down
Loading