Fix emojies in item card

This commit is contained in:
Anton 2023-12-01 11:53:42 +01:00
parent 385d9463ad
commit 4248bfa253

View file

@ -1,5 +1,5 @@
<template> <template>
<div id="repository-status-value-wrapper" class="flex flex-col min-min-h-[46px] h-auto gap-[6px]"> <div ref="container" id="repository-status-value-wrapper" class="flex flex-col min-min-h-[46px] h-auto gap-[6px]">
<div class="font-inter text-sm font-semibold leading-5 truncate" :title="colName"> <div class="font-inter text-sm font-semibold leading-5 truncate" :title="colName">
{{ colName }} {{ colName }}
</div> </div>
@ -88,16 +88,25 @@ export default {
this.isLoading = false; this.isLoading = false;
this.selected = this.id; this.selected = this.id;
}); });
this.replaceEmojiesInDropdown();
}, },
methods: { methods: {
changeSelected(id) { changeSelected(id) {
this.selected = id; this.selected = id;
if (id || id === null) { if (id || id === null) {
this.update(id); this.update(id);
this.replaceEmojiesInDropdown();
} }
}, },
parseEmoji(content) { parseEmoji(content) {
return twemoji.parse(content); return twemoji.parse(content);
},
replaceEmojiesInDropdown() {
setTimeout(() => {
twemoji.size = "24x24";
twemoji.base = '/images/twemoji/';
twemoji.parse(this.$refs.container);
}, 100);
} }
} }
}; };