Skip to content

Commit

Permalink
fix(lib): reset() not marking field as pristine
Browse files Browse the repository at this point in the history
  • Loading branch information
YannicEl committed Aug 7, 2023
1 parent afbbf48 commit 499a257
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/lib/src/useField.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ export function useField<T>(

const dirty = ref(false);
const pristine = computed(() => !dirty.value);
watch(value, () => {
dirty.value = true;
watch(value, (newValue) => {
if (newValue !== initialValue) dirty.value = true;
});

function reset(): void {
Expand Down

0 comments on commit 499a257

Please sign in to comment.