Skip to content

feat(base): allow components to provide their own slot accessor - #14128

Open
aborjinik wants to merge 1 commit into
mainfrom
table-nested-slot-projection-support
Open

aborjinik wants to merge 1 commit into
mainfrom
table-nested-slot-projection-support

Conversation

@aborjinik

@aborjinik aborjinik commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Previously UI5Element always generated a property accessor for every declared slot, which prevented a component from exposing a custom getter for a slot. The generated accessor now steps aside when the component's prototype already defines a descriptor for the slot's property name, and getSlottedNodes() reads the raw slot content from _state so a component can call it from its own accessor.

This enables resolving slotted children that are projected through a chain of <slot> elements across shadow DOM boundaries. ui5-table uses it for its rows and headerRow slots, and TableRowBase._table now walks up via assignedSlot so forwarded rows still find their owning table.

@aborjinik
aborjinik force-pushed the table-nested-slot-projection-support branch from 8fd398b to ff7b2ee Compare October 6, 2026 21:03
Previously `UI5Element` always generated a property accessor for every
declared slot, which prevented a component from exposing a custom getter
for a slot. The generated accessor now steps aside when the component's
prototype already defines a descriptor for the slot's property name, and
`getSlottedNodes()` reads the raw slot content from `_state` so a
component can call it from its own accessor.

This enables resolving slotted children that are projected through a
chain of `<slot>` elements across shadow DOM boundaries. `ui5-table`
uses it for its `headerRow` and `rows` slots, and `TableRowBase._table`
now walks up via `assignedSlot` so forwarded rows still find their owning
table.
@aborjinik
aborjinik force-pushed the table-nested-slot-projection-support branch from ff7b2ee to 22e2dec Compare October 6, 2026 22:00
@aborjinik
aborjinik deployed to netlify-preview October 6, 2026 22:00 — with GitHub Actions Active
@sap-ui5-webcomponents-release

Copy link
Copy Markdown

This branch was successfully deployed

1 active deployment
netlify-preview — 22e2deca Deployed Oct 6, 2026 by aborjinik via deploy-preview #3451
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.

1 participant