-
-
Notifications
You must be signed in to change notification settings - Fork 370
Open
Labels
Description
Bug report
Current behavior
Calling event.preventBaseUIHandler() inside some event handlers yields an error although the types say preventBaseUIHandler exists:
event.preventBaseUIHandler is not a function
Some examples of event handlers that have wrong types:
MenuItem:onMouseDownMenuCheckboxItem:onMouseDownMenuRadioItem:onMouseDownMenuLinkItem:onMouseDown,onKeyDown,onKeyUpAccordionTrigger:onMouseDown,onMouseUp
This is probably a general type problem affecting event handlers in many components.
Expected behavior
Either update the types to remove preventBaseUIHandler from the relevant types or include preventBaseUIHandler in such events, but the latter probably doesn't make sense if the event handler in question is not doing anything on the Base UI side.
Reproducible example
- Menu: https://stackblitz.com/edit/xy2mzl1t?file=src/App.tsx
- Accordion: https://stackblitz.com/edit/gkvdhatu?file=src%2FApp.tsx
Base UI version
v1.2.0
Reactions are currently unavailable