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

feat(ui5-date-picker): Replace openPicker method with open property #8749

Merged
merged 13 commits into from
May 8, 2024

Conversation

didip1000
Copy link
Contributor

@didip1000 didip1000 commented Apr 12, 2024

Replaced openPicker methods with open property in ui5-date-picker and ui5-datetime-picker components. This change promotes a more declarative approach when working with popovers.

BREAKING CHANGE: removed openPicker(), closePicker() and isOpen() methods.

Before the ui5-date-picker popover can be opened and closed by calling openPicker() and closePicker():

const datePicker = document.getElementById("exampleID");
datePicker.openPicker();
datePicker.closePicker();

Now the popover is opened and closed by updating the open property to true or false respectively:

const datePicker = document.getElementById("exampleID");
datePicker.open = true;
datePicker.open = false;

Related to: #8461

Copy link

@BorisDafov BorisDafov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve the PR from UA perspective.

packages/main/src/DatePicker.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@unazko unazko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change behaves as expected.

packages/main/src/DatePicker.ts Show resolved Hide resolved
@unazko unazko marked this pull request as ready for review April 30, 2024 12:38
@ilhan007
Copy link
Member

In BREAKING CHANGES section, you need to provide instructions how each of the previous APIs are replaced now with code examples - you can use all other merged PRs for reference

tsanislavgatev
tsanislavgatev previously approved these changes May 7, 2024
@tsanislavgatev tsanislavgatev self-requested a review May 7, 2024 08:52
@tsanislavgatev tsanislavgatev dismissed their stale review May 7, 2024 08:53

unintentional apporove

@didip1000 didip1000 requested a review from ilhan007 May 8, 2024 07:10
@ilhan007 ilhan007 merged commit d283984 into main May 8, 2024
10 checks passed
@ilhan007 ilhan007 deleted the datepicker-open branch May 8, 2024 10:14
@ilhan007 ilhan007 mentioned this pull request May 8, 2024
LidiyaGeorgieva pushed a commit that referenced this pull request May 9, 2024
…ty (#8749)

Replaced `openPicker` methods with `open` property in `ui5-date-picker`, `ui5-daterange-picker` `ui5-datetime-picker` components. This change promotes a more declarative approach when working with popovers.

BREAKING CHANGE: removed `openPicker()`, `closePicker()` and `isOpen()` methods. If you previously used `openPicker()` and `closePicker()`:
```ts
const datePicker = document.getElementById("exampleID");
datePicker.openPicker();
datePicker.closePicker();
```
Now use the `open` property respectively: 
```ts
const datePicker = document.getElementById("exampleID");
datePicker.open = true;
datePicker.open = false;
```

Related to: #8461
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants