Skip to content

Commit

Permalink
Refactor(web-react): Sort rest props in DropdownTrigger by importance
Browse files Browse the repository at this point in the history
  • Loading branch information
literat committed Jun 6, 2024
1 parent 04bdf6a commit 6f1e000
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ export const DropdownTrigger = <T extends ElementType = 'button'>(props: Dropdow

return (
<Component
{...rest} // ⚠️ This is maybe a bug, when component is pass via `elementType` prop, the rest props are passed to the component
{...otherProps}
{...triggerProps}
id={id}
{...rest}
ref={triggerRef}
className={classNames(classProps.trigger, styleProps.className)}
style={styleProps.style}
{...triggerProps}
{...otherProps}
>
{typeof children === 'function' ? children({ isOpen }) : children}
</Component>
Expand Down

0 comments on commit 6f1e000

Please sign in to comment.