mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
parent
fc632276f1
commit
35f1d0facb
@ -9,6 +9,7 @@ interface Props {
|
|||||||
onChange: (item: SelectableValue<string | null>) => void;
|
onChange: (item: SelectableValue<string | null>) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const MIN_WIDTH = 90;
|
||||||
export const AdHocFilterKey: FC<Props> = ({ datasource, onChange, filterKey }) => {
|
export const AdHocFilterKey: FC<Props> = ({ datasource, onChange, filterKey }) => {
|
||||||
const loadKeys = () => fetchFilterKeys(datasource);
|
const loadKeys = () => fetchFilterKeys(datasource);
|
||||||
const loadKeysWithRemove = () => fetchFilterKeysWithRemove(datasource);
|
const loadKeysWithRemove = () => fetchFilterKeysWithRemove(datasource);
|
||||||
@ -22,6 +23,7 @@ export const AdHocFilterKey: FC<Props> = ({ datasource, onChange, filterKey }) =
|
|||||||
value={filterKey}
|
value={filterKey}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
loadOptions={loadKeys}
|
loadOptions={loadKeys}
|
||||||
|
inputMinWidth={MIN_WIDTH}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@ -34,6 +36,7 @@ export const AdHocFilterKey: FC<Props> = ({ datasource, onChange, filterKey }) =
|
|||||||
value={filterKey}
|
value={filterKey}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
loadOptions={loadKeysWithRemove}
|
loadOptions={loadKeysWithRemove}
|
||||||
|
inputMinWidth={MIN_WIDTH}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user