-
-
Notifications
You must be signed in to change notification settings - Fork 985
Description
Describe the bug
I understood the last passed prop win on multiple identical props passed.
But it does not work for something like on:change
See play here
I think in CompA
the on:change
should be overwritten with the passed function. Yet both are triggered!
In CompB
the explicit ??
assign overwrites as expected.
Am I misunderstanding something or is this a bug?
Your Example Website or App
https://playground.solidjs.com/anonymous/8911364f-e059-4a3b-99f0-35b9afbeb994
Steps to Reproduce the Bug or Issue
const hi=()=>console.log(11);
const CompA=(props)=><input on:change={hi} {...props} placeholder="fix"/>;
const CompB=(props)=><input on:change={props["on:change"]??hi} placeholder="default" {...props}/>;
const App=()=><>
A=<CompA on:change={e=>console.log(22)} placeholder="A"/>
B=<CompB on:change={e=>console.log(33)} placeholder="B"/>
</>
render(() => , document.getElementById("app")!);
Expected behavior
on:change
prop should be overwritten with the passed on:change
function
Screenshots or Videos
No response
Platform
anywhere
Additional context
No response