Skip to content

Commit

Permalink
fix: fixing dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
paulushcgcj committed Sep 1, 2023
1 parent 24a7899 commit 2d097fb
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions frontend/src/components/forms/DropdownInputComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const emitValueChange = (newValue: string): void => {
}
//Watch for changes on the input
watch([selectedValue], () => {
console.log('watch',selectedValue.value)
validateInput(selectedValue.value)
emitValueChange(selectedValue.value)
})
Expand All @@ -77,20 +78,6 @@ const validateInput = (newValue: any) => {
.shift() ?? props.errorMessage
}
}
watch(
() => props.modelValue,
() => {
selectedValue.value = ''
setTimeout(() => (selectedValue.value = props.initialValue), 400)
}
)
watch(
() => props.initialValue,
() => {
if(selectedValue.value === props.initialValue) return
setTimeout(() => (selectedValue.value = props.initialValue), 400)
}
)
revalidateBus.on(() => validateInput(selectedValue.value))
</script>
Expand Down

0 comments on commit 2d097fb

Please sign in to comment.