Skip to content

Commit

Permalink
fix(emoji-picker): NO-JIRA fix ref reactivity in vue2 (#512)
Browse files Browse the repository at this point in the history
Co-authored-by: iropolo <[email protected]>
  • Loading branch information
iropolo and iropolo authored Sep 27, 2024
1 parent 57bd549 commit c4255c1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ export default {
tabLabels () {
return this.recentlyUsedEmojis.length
? this.tabSetLabels.map((label, index) => ({ label, ref: this.$refs[`tabLabelRef-${index}`] }))
: this.tabSetLabels.slice(1).map((label, index) => ({ label, ref: this.$refs[`tabLabelRef-${index}`] }));
? this.tabSetLabels.map((label) => ({ label }))
: this.tabSetLabels.slice(1).map((label) => ({ label }));
},
tabs () {
Expand Down Expand Up @@ -254,10 +254,10 @@ export default {
methods: {
setupTabLabelRefs () {
this.tabSetLabels?.forEach((label, index) => {
this.tabSetLabels?.forEach((_, index) => {
const refKey = `tabLabelRef-${index}`;
if (this.$refs[refKey]) {
this.$set(this.tabLabels, index, { label, ref: this.$refs[refKey] });
this.$set(this.tabLabels, index, { ...this.tabLabels[index], ref: this.$refs[refKey] });
}
});
},
Expand Down

0 comments on commit c4255c1

Please sign in to comment.