-
Notifications
You must be signed in to change notification settings - Fork 941
Closed
Description
Problem description:
Have onChange handlers behave as in any react event handler. Our handlers should be similar to:
// desired state
onSelectedItemChange = (event, {selectedItem, type}) => { ... }
// current state
onSelectedItemChange = ({selectedItem, type}) => { ... }Suggested solution:
Pass event in dispatch action and use that in callOnChangeProps for all handlers (onStateChange, onIsOpenChange etc).
This is a breaking change, as it will add the event as first parameter to these handlers, and the second parameter will be the current first one (changes + type).
Typescript typing should also be updated.
Since we already have #985 that contains breaking changes to handlers, these should be both included in a breaking changes release (v6).