Refactor #4953 - For Chips

pull/5206/head
mertsincan 2024-02-02 15:46:45 +00:00
parent 66966bbb17
commit 11a22a2e0a
1 changed files with 9 additions and 1 deletions

View File

@ -67,12 +67,20 @@ export default {
emits: ['update:modelValue', 'add', 'remove', 'focus', 'blur'],
data() {
return {
id: UniqueComponentId(),
id: this.$attrs.id,
inputValue: null,
focused: false,
focusedIndex: null
};
},
watch: {
'$attrs.id': function (newValue) {
this.id = newValue || UniqueComponentId();
}
},
mounted() {
this.id = this.id || UniqueComponentId();
},
methods: {
onWrapperClick() {
this.$refs.input.focus();