When unmounted, resetting field
This commit is contained in:
parent
bd6d6397ed
commit
2485e2ac73
1 changed files with 5 additions and 0 deletions
|
|
@ -76,6 +76,7 @@
|
||||||
value: inputValue,
|
value: inputValue,
|
||||||
handleChange,
|
handleChange,
|
||||||
errors,
|
errors,
|
||||||
|
resetField
|
||||||
} = useField(props.groupName, props.validationRules,
|
} = useField(props.groupName, props.validationRules,
|
||||||
{
|
{
|
||||||
type: inputType,
|
type: inputType,
|
||||||
|
|
@ -84,8 +85,12 @@
|
||||||
return {
|
return {
|
||||||
handleChange,
|
handleChange,
|
||||||
errors,
|
errors,
|
||||||
|
resetField
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
unmounted(){
|
||||||
|
this.resetField();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue