Closed benjivm closed 2 years ago
Wrapping in nextTick()
seems to resolve the issue, is this expected?
nextTick(() => {
notify({
group: 'top',
title: 'Success',
text: pageProps.toast
}, 4000);
});
Hi, sorry for the late response, I just tested this in one of our applications and it's working properly, we have something like this:
<script setup>
import { computed, watch } from 'vue'
import { usePage } from '@inertiajs/inertia-vue3'
import { notify } from 'notiwind'
const flash = computed(() => usePage().props.value.flash)
watch(flash, () => {
notify({
group: 'bottom',
title: '...',
type: 'sucess',
text: '...',
}, 5000)
})
</script>
I'm going to close it for now as it seems it's not a problem of the library but feel free to reopen if you find some issues related to this.
Hi, I'm having an issue getting this working with Inertia.js and a watcher. I can trigger the notification with a normal function or hook (e.g.,
onMounted
), but not in a watcher.Component:
My notifications are configured identically to this part of your example code, and work just fine when triggered with the function.