From a532efcf8c7ad05b5cc83e4fca7a73371999b324 Mon Sep 17 00:00:00 2001 From: Christian Taylor Date: Thu, 15 Aug 2024 11:26:31 -0500 Subject: [PATCH] Target the correct parent element for removeal Fixes #87 --- docs/examples/notifications.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/examples/notifications.md b/docs/examples/notifications.md index acde3cc..664f947 100644 --- a/docs/examples/notifications.md +++ b/docs/examples/notifications.md @@ -67,14 +67,14 @@ Now our messages will smoothly transition in and out as they are added and remov }, dismiss() { this.show = false - setTimeout(() => this.$el.remove(), 500) + setTimeout(() => this.$root.remove(), 500) } }" x-show="show" x-transition.duration.500ms > The button was clicked 1 time. - + ``` @@ -89,14 +89,14 @@ And finally, we can make our notifications automatically dismiss after 6 seconds }, dismiss() { this.show = false - setTimeout(() => this.$el.remove(), 500) + setTimeout(() => this.$root.remove(), 500) } }" x-show="show" x-transition.duration.500ms > The button was clicked 1 time. - + ``` @@ -151,14 +151,14 @@ And finally, we can make our notifications automatically dismiss after 6 seconds }, dismiss() { this.show = false - setTimeout(() => this.$el.remove(), 500) + setTimeout(() => this.$root.remove(), 500) } }" x-show="show" x-transition.duration.500ms > The button was clicked ${count} ${count > 1 ? 'times' : 'time'}. - + ` }