Skip to content

Commit

Permalink
refactor: make autoOpenDisabled property use sync: true (#8227)
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan authored Nov 25, 2024
1 parent 591b644 commit 0b3da36
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 4 additions & 1 deletion packages/date-picker/src/vaadin-date-picker-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,10 @@ export const DatePickerMixin = (subclass) =>
* Set true to prevent the overlay from opening automatically.
* @attr {boolean} auto-open-disabled
*/
autoOpenDisabled: Boolean,
autoOpenDisabled: {
type: Boolean,
sync: true,
},

/**
* Set true to display ISO-8601 week numbers in the calendar. Notice that
Expand Down
5 changes: 2 additions & 3 deletions packages/date-picker/test/fullscreen.common.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect } from '@vaadin/chai-plugins';
import { aTimeout, fixtureSync, nextRender, nextUpdate, outsideClick, tabKeyDown, tap } from '@vaadin/testing-helpers';
import { aTimeout, fixtureSync, nextRender, outsideClick, tabKeyDown, tap } from '@vaadin/testing-helpers';
import { sendKeys, setViewport } from '@web/test-runner-commands';
import sinon from 'sinon';
import { getFocusableCell, open, touchTap, waitForOverlayRender } from './helpers.js';
Expand Down Expand Up @@ -97,9 +97,8 @@ describe('fullscreen mode', () => {
});

describe('auto open disabled', () => {
beforeEach(async () => {
beforeEach(() => {
datePicker.autoOpenDisabled = true;
await nextUpdate(datePicker);
});

it('should not open overlay on input tap', () => {
Expand Down

0 comments on commit 0b3da36

Please sign in to comment.