Closed Amiko1 closed 1 year ago
I'm trying to give inital v-model to the input from parent but it does not work
<script setup> import { Input } from "flowbite-vue"; defineProps(['modelValue']) defineEmits(['update:modelValue']) </script> <template> <Input class="caret-red-700 rounded-2xl py-4 text-gray-400 font-medium placeholder-gray-300 focus:border-velvet focus:outline-none focus:ring-velvet" placeholder="მოძებნე სასურველი კერძი" :value="modelValue" @input="$emit('update:modelValue', $event.target.value)" > <template #suffix> <Icon class="mb-1.5" name="tabler:search" size="20" color="#D9D9D9" /> </template> </Input> </template> <style scoped></style>
it's my component
next if I change my reactive variable it will take value but I want do it at first rendering, as I found it's normal behavior of your Input component, now I fixed it with setTimout, can you provide me some better way?
You have an error in your component, replace :value onto :model-value
:value
:model-value
I'm trying to give inital v-model to the input from parent but it does not work
it's my component
next if I change my reactive variable it will take value but I want do it at first rendering, as I found it's normal behavior of your Input component, now I fixed it with setTimout, can you provide me some better way?