Set empty query labels to wildcard '*' for proper graph display

• Handle empty/whitespace query labels
• Auto-set to '*' when label is blank
• Ensure consistent graph behavior
• Prevent invalid query states
This commit is contained in:
yangdx 2025-09-23 22:41:31 +08:00
parent c9c691384b
commit 7b63c16b1c

View file

@ -94,7 +94,13 @@ const GraphLabels = () => {
useGraphStore.getState().setTypeColorMap(new Map<string, string>())
try {
const currentLabel = label
let currentLabel = label
// If queryLabel is empty, set it to '*'
if (!currentLabel || currentLabel.trim() === '') {
useSettingsStore.getState().setQueryLabel('*')
currentLabel = '*'
}
if (currentLabel && currentLabel !== '*') {
// Scenario 1: Has specific label, try to refresh current label