effector
effector copied to clipboard
[forest] Ability to pass handlers array with configurations for each handler
Proposal
At the moment for spec/h config we have this kind of handler param
handler?:
| {[domEvent: string]: Event<any>}
| {
config: {
passive?: boolean
capture?: boolean
prevent?: boolean
stop?: boolean
}
on: {[domEvent: string]: Event<any>}
}
Would be nice if it will be possible to pass an array of handlers with configurations for each event instead of just only 1.
Use case
h('input', {
handler: [
{
config: {
stop: true
},
on: { click: someEvent }
},
{
on: { focus: otherEvent }
}
]
});