We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c91fec9 + 8b457c8 commit 0b98d55Copy full SHA for 0b98d55
src/components/DadataSuggestions.vue
@@ -4,7 +4,7 @@
4
class="dadata-input"
5
type="text"
6
autocomplete="off"
7
- @change="$emit('change', model)"
+ @change="onChange"
8
>
9
</template>
10
@@ -134,6 +134,18 @@ export default {
134
}
135
this.$emit('input', this.model);
136
},
137
+
138
+ onChange() {
139
+ if (this.model === null || this.model === '') {
140
+ this.$emit('update:fullInfo', null);
141
+ }
142
+ if (typeof this.model === 'string') {
143
144
145
+ this.$emit('input', this.model);
146
+ this.$emit('change', this.model);
147
+ },
148
149
150
151
destroyed() {
0 commit comments