File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed
src/components/AppSelector Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -52,31 +52,23 @@ export default function ChartSelector({
52
52
const newUrl = generatePath ( path , { ...replacements , [ primaryKey ] : selected . value } )
53
53
push ( newUrl )
54
54
}
55
- const [ inputValue , setInputValue ] = useState ( '' )
56
-
57
- const onInputChange : SelectPickerProps [ 'onInputChange' ] = async ( val ) => {
58
- setInputValue ( val )
59
- }
60
55
61
56
const getChartsOptions = ( ) : GroupBase < SelectPickerOptionType < string | number > > [ ] => [
62
57
{
63
58
label : 'All Charts' ,
64
59
options :
65
60
result ?. result ?. map ( ( res ) => ( {
66
61
value : res [ apiPrimaryKey || primaryKey ] ,
67
- label : res [ primaryValue ] ,
62
+ label : ` ${ res . chart_name } / ${ res [ primaryValue ] } ` ,
68
63
} ) ) || [ ] ,
69
64
} ,
70
65
]
71
-
72
66
const selectedChartLabel = listMap . has ( _primaryKey ) ? ( listMap . get ( _primaryKey ) [ primaryValue ] as string ) : ''
73
67
74
68
return (
75
69
< ContextSwitcher
76
70
inputId = { `chart-switcher-${ _primaryKey } ` }
77
71
options = { getChartsOptions ( ) }
78
- inputValue = { inputValue }
79
- onInputChange = { onInputChange }
80
72
isLoading = { loading }
81
73
onChange = { selectApp }
82
74
value = { {
You can’t perform that action at this time.
0 commit comments