Svelte: Fix FontInput component infinite loop

This commit is contained in:
Keavon Chambers
2023-02-12 01:01:40 -08:00
parent 717e9c861a
commit 33b5c0f5f4
3 changed files with 12 additions and 19 deletions
@@ -105,7 +105,6 @@ export default defineComponent({
open: false,
entries: [] as MenuListEntry[],
activeEntry: undefined as MenuListEntry | undefined,
highlighted: undefined as MenuListEntry | undefined,
entriesStart: 0,
minWidth: this.isStyle ? 0 : 300,
};
@@ -113,7 +112,6 @@ export default defineComponent({
async mounted() {
this.entries = await this.getEntries();
this.activeEntry = this.getActiveEntry(this.entries);
this.highlighted = this.activeEntry;
},
methods: {
async setOpen(): Promise<void> {
@@ -175,12 +173,10 @@ export default defineComponent({
async fontFamily() {
this.entries = await this.getEntries();
this.activeEntry = this.getActiveEntry(this.entries);
this.highlighted = this.activeEntry;
},
async fontStyle() {
this.entries = await this.getEntries();
this.activeEntry = this.getActiveEntry(this.entries);
this.highlighted = this.activeEntry;
},
},
components: {