mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 17:32:36 +00:00
Refactor #4953 - For Chips
This commit is contained in:
parent
66966bbb17
commit
11a22a2e0a
1 changed files with 9 additions and 1 deletions
|
@ -67,12 +67,20 @@ export default {
|
||||||
emits: ['update:modelValue', 'add', 'remove', 'focus', 'blur'],
|
emits: ['update:modelValue', 'add', 'remove', 'focus', 'blur'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: UniqueComponentId(),
|
id: this.$attrs.id,
|
||||||
inputValue: null,
|
inputValue: null,
|
||||||
focused: false,
|
focused: false,
|
||||||
focusedIndex: null
|
focusedIndex: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
'$attrs.id': function (newValue) {
|
||||||
|
this.id = newValue || UniqueComponentId();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.id = this.id || UniqueComponentId();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onWrapperClick() {
|
onWrapperClick() {
|
||||||
this.$refs.input.focus();
|
this.$refs.input.focus();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue