Files
gpuix/examples
Tommy D. Rossi ef9b670b3f Add asChild support to Select and Combobox items
GPUI uses a flat painted hit list and does not bubble clicks. A custom row
with its own background can therefore cover SelectItem or ComboboxItem and
prevent selection, hover state, and popup close behavior.

Add asChild to both item primitives through the existing renderSlot path.
The custom row becomes the host item itself, so it owns one native hit target,
one event id, the item ref, composed handlers, state styles, and disabled
selection behavior.

Migrate every chat picker to asChild. MenuRow now forwards its ref and host
props, while keeping its own row padding. Add end-to-end tests for filled
Select and Combobox rows and a chat regression assertion for menu row height.

Document when to use asChild, including the ref and host-prop forwarding
contract. Add a React patch changeset with the new public API.

Session: ses_f61007e8fffe0tRyMx0uRPPeCZ
2026-09-14 12:22:27 +02:00
..