Skip to content

Conversation

@kgogov
Copy link
Contributor

@kgogov kgogov commented Jan 16, 2026

Use item._individualSlot instead of item.slot when querying rendered items. For non-ToolbarItem elements, item.slot is an empty string (""), which creates an invalid CSS selector "#" and causes a SyntaxError.

This particularly affects @ui5/webcomponents-react applications using conditional rendering with regular HTML elements.

Fixes: #12855

@ui5-webcomponents-bot
Copy link
Collaborator

ui5-webcomponents-bot commented Jan 16, 2026

@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview January 16, 2026 15:41 Inactive
Use item._individualSlot instead of item.slot when querying rendered
items. For non-ToolbarItem elements, item.slot is an empty string (""),
which creates an invalid CSS selector "#" and causes a SyntaxError.

This particularly affects @ui5/webcomponents-react applications using
conditional rendering with regular HTML elements.

Fixes: #12855
@kgogov kgogov force-pushed the fix-toolbar-items branch from 702e6f3 to 3d0403b Compare January 19, 2026 08:01
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview January 19, 2026 08:07 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Toolbar]: querySelector fails with '#' selector when using non-Toolbar item elements

3 participants