Skip to content

Commit c756e30

Browse files
strittiCopilot
andauthored
snack-bar.component.ts aktualisieren
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent f7d5532 commit c756e30

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/app/component/snack-bar/snack-bar.component.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ export class SnackBarComponent {
5959
this.visible.set(false)
6060
this.timeoutId = null
6161
}, data.duration || 5000)
62+
} else {
63+
// Hide snackbar and clear any pending timeout when cleared
64+
this.visible.set(false)
65+
if (this.timeoutId !== null) {
66+
window.clearTimeout(this.timeoutId)
67+
this.timeoutId = null
68+
}
6269
}
6370
})
6471

0 commit comments

Comments
 (0)