zag icon indicating copy to clipboard operation
zag copied to clipboard

fix(menu): merge props before normalizing in getTriggerItemProps

Open nikparo opened this issue 3 months ago • 2 comments

Closes #

📝 Description

Add a brief description

The menu getItemProps and getTriggerProps return normalized props, that then get merged using the core mergeProps function that does not take normalization into account. This is a problem for e.g. Lit, where the event handler prefix is @ rather than on. To properly merge these sets of props in the connect function we need to separate handling of framework-specific and framework-agnostic prop handling.

⛳️ Current behavior (updates)

Please describe the current behavior that you are modifying

If the normalizeProps function does not use on prefix for event handlers, only the latter is kept.

🚀 New behavior

Please describe the behavior or changes this PR adds

Event handlers are properly merged, as prop normalization happens after the merge.

💣 Is this a breaking change (Yes/No):

No

📝 Additional Information

nikparo avatar Sep 09 '25 08:09 nikparo