mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
This reverts commit 052acfc2ce
.
This commit is contained in:
parent
f08175b6b3
commit
aee7f3ba76
2 changed files with 16 additions and 4 deletions
|
@ -40,8 +40,14 @@
|
|||
let timeoutId = undefined;
|
||||
|
||||
function close(closeFromTimeout) {
|
||||
open = false;
|
||||
dispatch("close", { timeout: closeFromTimeout === true });
|
||||
const shouldContinue = dispatch(
|
||||
"close",
|
||||
{ timeout: closeFromTimeout === true },
|
||||
{ cancelable: true }
|
||||
);
|
||||
if (shouldContinue) {
|
||||
open = false;
|
||||
}
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
|
|
|
@ -43,8 +43,14 @@
|
|||
let timeoutId = undefined;
|
||||
|
||||
function close(closeFromTimeout) {
|
||||
open = false;
|
||||
dispatch("close", { timeout: closeFromTimeout === true });
|
||||
const shouldContinue = dispatch(
|
||||
"close",
|
||||
{ timeout: closeFromTimeout === true },
|
||||
{ cancelable: true }
|
||||
);
|
||||
if (shouldContinue) {
|
||||
open = false;
|
||||
}
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue