We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mergeReactProps
Sandbox: https://codesandbox.io/p/sandbox/fervent-chaplygin-779dcw
Click the toggle and it will throw: Uncaught TypeError: Cannot create property 'preventBaseUIHandler' on boolean 'true'
Uncaught TypeError: Cannot create property 'preventBaseUIHandler' on boolean 'true'
<Tooltip.Trigger render={ <Toggle pressed={isPressed} onPressedChange={(nextPressed) => { setPressed(nextPressed); }} > <Icon /> </Toggle> } />
The uncontrolled counterpart of this works: https://codesandbox.io/p/sandbox/epic-hofstadter-62pnf3
The issue is that mergeReactProps expects the event as the first argument like native handlers, but our custom handlers usually pass event as the second: https://github.com/mui/base-ui/blob/master/packages/react/src/utils/mergeReactProps.ts#L44
The text was updated successfully, but these errors were encountered:
This is also the case with e.g. motion events, although my solution here assumes it's an object which is also not enough:
motion
https://github.com/mui/base-ui/pull/1236/files#diff-9c898048e86d277b9a0100de67d4d51e04b4c64bfed6c5412e6cb537ebaab3f1L52-R57
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Sandbox: https://codesandbox.io/p/sandbox/fervent-chaplygin-779dcw
Click the toggle and it will throw:
Uncaught TypeError: Cannot create property 'preventBaseUIHandler' on boolean 'true'
The uncontrolled counterpart of this works: https://codesandbox.io/p/sandbox/epic-hofstadter-62pnf3
The issue is that
mergeReactProps
expects the event as the first argument like native handlers, but our custom handlers usually pass event as the second: https://github.com/mui/base-ui/blob/master/packages/react/src/utils/mergeReactProps.ts#L44The text was updated successfully, but these errors were encountered: