Shivamyadav's avatar

My notification reply does not updates the UI?

I have a notification show page, inside it i have a form to reply only 1 time.

After a reply to that particular mail my controller return back and my show page props and ui did not gets updated.

my controller code

my show template vue code

my show notification setup code


const page = usePage();
// const notification = page.props.notification.data;
// const replyExists = page.props.exists;
const notification = computed(() => page.props.notification.data);
const replyExists = computed(() => page.props.exists);


const form = useForm({
    to: notification?.email,
    subject: notification?.subject,
    body: "",
});

// function to reply a particular mail
function mailReply() {
    form.post(route("notifications.reply", notification.value.id), {
        preserveScroll: true,
        only: ['notification', 'exists', 'flash'],
    });
}
0 likes
0 replies

Please or to participate in this conversation.