Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ui5-toolbar): update ToolbarRegistry to use metadata tag instead …
…of class name (#9607) This change updates the registration mechanism for toolbar items to use a metadata tag instead of the class name. #### Changes: - In `Toolbar.ts`, updated the `getItemsInfo` method to retrieve the registered toolbar item using `ctor.getMetadata().getPureTag()` instead of `item.constructor.name`. - In `ToolbarRegistry.ts`, modified the `registerToolbarItem` function to register items with `ElementClass.getMetadata().getPureTag()` instead of `ElementClass.name`. #### Issue Addressed: In production builds, webpack minifies class names which resulted in all toolbar buttons being registered under the same name ("i"). This caused all toolbar items to be registered as the last one registered due to name conflicts. By switching to a more stable identifier from the class metadata, we prevent such issues.
- Loading branch information