primefaces / primevue-nuxt-module

MIT License
73 stars 11 forks source link

Toast does not show if page is rendered server side #21

Closed DanielMcAssey closed 1 year ago

DanielMcAssey commented 1 year ago

When using toasts during the initial render, the toasts do not appear.

Example below

<script setup lang="ts">
import { useToast } from 'primevue/usetoast';

const toast = useToast();

toast.add({
  severity: 'error',
  summary: 'Failed to get response',
  detail: 'There was a problem getting the response',
});
</script>
<template>
  <div class="h-full flex items-center justify-center">
    <ClientOnly>
        <Toast />
    </ClientOnly>
  </div>
</template>
mertsincan commented 1 year ago

Hi,

I think this is not related to primevue-nuxt-module. Please use https://github.com/orgs/primefaces/discussions/categories/primevue

Best Regards,