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

BarcodeScannerDialog: add close event #8695

Closed
1 task done
Lukas742 opened this issue Apr 9, 2024 · 2 comments · Fixed by #8753
Closed
1 task done

BarcodeScannerDialog: add close event #8695

Lukas742 opened this issue Apr 9, 2024 · 2 comments · Fixed by #8753
Assignees
Labels

Comments

@Lukas742
Copy link
Collaborator

Lukas742 commented Apr 9, 2024

Feature Request Description

With v1.24.0 the open property was introduced and the show and close methods were deprecated.

In React it's common to fully control a component, but since there are no events exposed if the dialog is closed, this is not possible.

E.g.:

  • Go to StackBlitz
  • Open the BarcodeScannerDialog by clicking the respective button (React state open is set to true)
  • Close the dialog by pressing ESC or the "Cancel" button
  • Since there is no (public) way to register to a "close" event, the open state stays true.

So if I didn't miss something, the dialog is currently not usable without deviating from the standard of how to control components in React, or using deprecated methods.

On a side note, your example still uses the deprecated methods.

Proposed Solution

Expose the close events of the Dialog or add a custom close event specific to this component.

Proposed Alternatives

No response

Organization

UI5WCR

Additional Context

No response

Priority

None

Privacy Policy

  • I’m not disclosing any internal or sensitive information.
@petyabegovska petyabegovska added this to Issues in Maintenance - Topic P via automation Apr 9, 2024
@petyabegovska
Copy link
Collaborator

Hello @SAP/ui5-webcomponents-topic-p,

Please check the request and also update the sample not to use deprecated api.

Best regards,
Petya

@kgogov kgogov self-assigned this Apr 9, 2024
@kgogov kgogov moved this from Issues to In Progress in Maintenance - Topic P Apr 12, 2024
Maintenance - Topic P automation moved this from In Progress to Completed Apr 15, 2024
kgogov added a commit that referenced this issue Apr 15, 2024
…ts (#8753)

This change adds support for `close` and `open` events to
the barcode scanner dialog. Along with this change, the documentation
and the sample have been updated.

Fixes #8695
@vladitasev
Copy link
Contributor

Hi @Lukas742
We've added a close event and we've also refactored the component to use completely declarative APIs: #8760.

Should be easier for you overall - just bind the open property and listen for the close event

Regards,
Vladi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

4 participants