diff --git a/components/lib/chips/Chips.vue b/components/lib/chips/Chips.vue index feb7ea7cc..9b79958b3 100755 --- a/components/lib/chips/Chips.vue +++ b/components/lib/chips/Chips.vue @@ -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();