From 2535082c5d20c6d0f86631957106a2c36ff422bf Mon Sep 17 00:00:00 2001 From: Tako Date: Tue, 20 Dec 2022 00:22:29 +0000 Subject: [PATCH] fix select values updating with delay --- src/stores/plotConfig.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stores/plotConfig.ts b/src/stores/plotConfig.ts index 0f5f49af..7b185684 100644 --- a/src/stores/plotConfig.ts +++ b/src/stores/plotConfig.ts @@ -30,10 +30,10 @@ export const usePlotConfigStore = defineStore('plotConfig', { this.plotConfigName = plotConfigName; storePlotConfigName(plotConfigName); }, - plotConfigChanged() { + plotConfigChanged(plotConfigName = '') { console.log('plotConfigChanged'); + this.setPlotConfigName(plotConfigName ? plotConfigName : this.plotConfigName); this.plotConfig = getCustomPlotConfig(this.plotConfigName); - this.setPlotConfigName(this.plotConfigName); }, setPlotConfig(plotConfig: PlotConfig) { console.log('emit...');