Skip to content

"onDismiss" option in "createInfoNotice" is not taken into account #31571

Closed

Description

When using wp.data.dispatch( 'core/notices' ).createInfoNotice and trying to pass a function for the onDismiss 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Good First IssueAn issue that's suitable for someone looking to contribute for the first timeNeeds DevReady for, and needs developer efforts[Package] Components/packages/components[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions