"onDismiss" option in "createInfoNotice" is not taken into account #31571
Labels
Good First Issue
An issue that's suitable for someone looking to contribute for the first time
Needs Dev
Ready for, and needs developer efforts
[Package] Components
/packages/components
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
When using
wp.data.dispatch( 'core/notices' ).createInfoNotice
and trying to pass a function for theonDismiss
option, the function is not triggered when the notice is dismissed.Typing something like
wp.data.dispatch( 'core/notices' ).createInfoNotice( 'hello', { onDismiss: () => { console.log( 'dismissed!' ) } } );
is not logging anything in the console, when the created notice is dismissed.Further information can be found here.
The text was updated successfully, but these errors were encountered: