Skip to content

Commit

Permalink
Refactor #4953 - For Chips
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Feb 2, 2024
1 parent 66966bb commit 11a22a2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion components/lib/chips/Chips.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 11a22a2

Please sign in to comment.