feat(ui5-barcode-scanner-dialog): added support for custom header and footer slots #10066
+208
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This Pull Request introduces support for custom
header
andfooter
slots in theui5-barcode-scanner-dialog
component. By adding header and footer slots, developers can now inject custom content into the dialog’s header and footer areas, enhancing flexibility and allowing for more personalized dialog interfaces.If no custom content is provided, the dialog will use its default header and footer layout, ensuring backward compatibility.
Usage
To utilize custom header and footer content, provide elements with the slot attribute set to header and/or footer:
Important Note
When you provide custom content for the
footer
slot, the default close button is not rendered. This means you need to include your own mechanism within the custom footer to close the dialog. Typically, this involves adding a button and attaching an event listener that closes the dialog:If you do not provide a custom footer, the dialog will include the default footer with a close button, allowing users to close the dialog without any additional implementation.
Related: #8919