Add initial value display for AsyncSelect

This commit is contained in:
yangdx
2025-04-06 15:53:04 +08:00
parent 0942bf102c
commit b003d613ee
3 changed files with 19 additions and 14 deletions

View File

@@ -450,13 +450,6 @@ const useLightrangeGraph = () => {
state.setRawGraph(data);
state.setGraphIsEmpty(false);
// ensusre GraphLabels show the current label on first load
const lastSuccessfulQueryLabel = useGraphStore.getState().lastSuccessfulQueryLabel;
if (!lastSuccessfulQueryLabel){
useSettingsStore.getState().setQueryLabel('');
useSettingsStore.getState().setQueryLabel(queryLabel);
console.log('Set queryLabel after query on page first load');
}
// Update last successful query label
state.setLastSuccessfulQueryLabel(currentQueryLabel);