Skip to content
This repository has been archived by the owner on Oct 4, 2022. It is now read-only.

Pass onHide callback option to the Toast components #76

Merged
merged 2 commits into from
May 21, 2022

Conversation

y1n0
Copy link
Contributor

@y1n0 y1n0 commented Dec 14, 2020

This solves issue #60.

We can pass an onHide: (id, position) => {} to be called in the end of the hiding mechanism.

const { hide } = cogoToast.success('This is a success message.', {
  onClick: () => {
    hide();
  },
  onHide: (id, position) => {
    console.log(`hid toast ${id}`);
  }
});

@aniljaiswal aniljaiswal merged commit 55fc167 into Cogoport:master May 21, 2022
@ankit-indexnine
Copy link

This onHide callback doesn't seem to be working. I tried logging a few console messages inside it, but none of them were printed.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants