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:
parent
c9c691384b
commit
7b63c16b1c
1 changed files with 7 additions and 1 deletions
|
|
@ -94,7 +94,13 @@ const GraphLabels = () => {
|
||||||
useGraphStore.getState().setTypeColorMap(new Map<string, string>())
|
useGraphStore.getState().setTypeColorMap(new Map<string, string>())
|
||||||
|
|
||||||
try {
|
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 !== '*') {
|
if (currentLabel && currentLabel !== '*') {
|
||||||
// Scenario 1: Has specific label, try to refresh current label
|
// Scenario 1: Has specific label, try to refresh current label
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue