[BUG] - DropdownTrigger and PopoverTrigger pass onClick to Button causing console warning #4399
Labels
📦 Scope : Components
Related to the components
✨ Type: Enhancement
New enhancement on existing codebase
NextUI Version
2.6.8
Describe the bug
Button
'sonClick
is deprecated butDropdownTrigger
and maybePopoverTrigger
are passing anonClick
prop to their one child, usually aButton
. This causes the deprecation warning to be logged even though no directButton
instances are usingonClick
.Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Button
as triggerExpected behavior
I expect no warnings.
Screenshots or Videos
Ignore the exact error, that's because the
warn
assumesprocess
and Vite doesn't surface that.nextui/packages/utilities/shared-utils/src/console.ts
Line 11 in afe0b52
Stack shows error comes from deprecation check here:
nextui/packages/hooks/use-aria-button/src/index.ts
Line 108 in afe0b52
Operating System Version
macOS
Browser
Chrome
The text was updated successfully, but these errors were encountered: