Skip to content

How can i watch all changes of values? #49

Closed Answered by tuddev
tuddev asked this question in Q&A
Discussion options

You must be logged in to vote

Ooops) i found solution:

I made this component and it works fine for me

<template><div /></template>
<script setup lang="ts">
import { useFormContext } from '@vorms/core';
import { watch } from 'vue';

const { values } = useFormContext();

watch(
  () => ({ ...values }),
  () => {
    console.log(values, 'values');
  },
);
</script>

<style scoped></style>

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tuddev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant