mirror of
https://github.com/grafana/grafana.git
synced 2025-02-12 08:35:43 -06:00
DataSourcePicker: Fix datasource picker input not clearing on close (#67248)
Fix datasource picker input not clearing on close
This commit is contained in:
parent
258f11f08d
commit
a4f1206811
@ -46,6 +46,7 @@ export function DataSourceDropdown(props: DataSourceDropdownProps) {
|
||||
});
|
||||
|
||||
const onClose = useCallback(() => {
|
||||
setFilterTerm('');
|
||||
setOpen(false);
|
||||
markerElement?.blur();
|
||||
}, [setOpen, markerElement]);
|
||||
@ -82,6 +83,7 @@ export function DataSourceDropdown(props: DataSourceDropdownProps) {
|
||||
placeholder={dataSourceLabel(currentDataSourceInstanceSettings)}
|
||||
onFocus={openDropdown}
|
||||
onClick={openDropdown}
|
||||
value={filterTerm}
|
||||
onChange={(e) => {
|
||||
setFilterTerm(e.currentTarget.value);
|
||||
}}
|
||||
|
Loading…
Reference in New Issue
Block a user