Skip to content

Commit 3e560e4

Browse files
committed
chore: chart selector label fix
1 parent ba94e0f commit 3e560e4

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/components/AppSelector/ChartSelector.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,31 +52,23 @@ export default function ChartSelector({
5252
const newUrl = generatePath(path, { ...replacements, [primaryKey]: selected.value })
5353
push(newUrl)
5454
}
55-
const [inputValue, setInputValue] = useState('')
56-
57-
const onInputChange: SelectPickerProps['onInputChange'] = async (val) => {
58-
setInputValue(val)
59-
}
6055

6156
const getChartsOptions = (): GroupBase<SelectPickerOptionType<string | number>>[] => [
6257
{
6358
label: 'All Charts',
6459
options:
6560
result?.result?.map((res) => ({
6661
value: res[apiPrimaryKey || primaryKey],
67-
label: res[primaryValue],
62+
label: `${res.chart_name} / ${res[primaryValue]}`,
6863
})) || [],
6964
},
7065
]
71-
7266
const selectedChartLabel = listMap.has(_primaryKey) ? (listMap.get(_primaryKey)[primaryValue] as string) : ''
7367

7468
return (
7569
<ContextSwitcher
7670
inputId={`chart-switcher-${_primaryKey}`}
7771
options={getChartsOptions()}
78-
inputValue={inputValue}
79-
onInputChange={onInputChange}
8072
isLoading={loading}
8173
onChange={selectApp}
8274
value={{

0 commit comments

Comments
 (0)