mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-20 20:33:02 +00:00
fix: allow for prevent default in toast notification
This commit is contained in:
parent
3b3a9c9a29
commit
14fda259e6
1 changed files with 4 additions and 2 deletions
|
@ -43,8 +43,10 @@
|
|||
let timeoutId = undefined;
|
||||
|
||||
function close(closeFromTimeout) {
|
||||
const shouldContinue = dispatch("close", { timeout: closeFromTimeout === true }, { cancelable: true });
|
||||
if (shouldContinue) {
|
||||
open = false;
|
||||
dispatch("close", { timeout: closeFromTimeout === true });
|
||||
}
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue