Open sebastian-kraemer opened 6 days ago
Hi @sebastian-kraemer
Thanks for reporting! I'll forward this issue to our UI5 Web Components Colleagues as the affected component is developed in their repository.
As a workaround, you can set the open
property directly on the element: https://stackblitz.com/edit/github-3vdyel-stt7yh?file=src%2FApp.tsx
Hi Colleagues,
there is currently no way to register to internal open
state changes of the DatePicker
component. This is problematic when using React, as when using a React state to control the open
value, the state is never reset when internally the open
property changes and therefore React omits updates as the state has the same value as before:
https://stackblitz.com/edit/github-3vdyel?file=src%2FApp.tsx
Exposing the close
event of the Popover would allow setting the open
state accordingly.
Hello @SAP/ui5-webcomponents-topic-b, Please take a look at this issue regarding opening a DatePicker and the "open" state indication.
Kind regards,
GV
SAPUI5 | SAP Development Support
Describe the bug
Since openPicker and closePicker are no longer available in v2, opening with a state variable only works once when closing the DatePicker Popover with ESC or by clicking outside the Popover. There is no callback when the Popover is closed if not selecting a value.
Isolated Example
https://stackblitz.com/edit/github-3vdyel?file=package.json
Reproduction steps
Expected Behaviour
Event is triggered when Popover was closed to update local state variable.
Screenshots or Videos
No response
UI5 Web Components for React Version
2.3.0
UI5 Web Components Version
2.3.0
Browser
Edge
Operating System
Windows
Additional Context
No response
Relevant log output
No response
Organization
No response
Declaration