AdHocFilter: Adds min width to segment input (#39225)

Closes #38937
This commit is contained in:
kay delaney 2021-09-16 09:37:43 +01:00 committed by GitHub
parent fc632276f1
commit 35f1d0facb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,6 +9,7 @@ interface Props {
onChange: (item: SelectableValue<string | null>) => void;
}
const MIN_WIDTH = 90;
export const AdHocFilterKey: FC<Props> = ({ datasource, onChange, filterKey }) => {
const loadKeys = () => fetchFilterKeys(datasource);
const loadKeysWithRemove = () => fetchFilterKeysWithRemove(datasource);
@ -22,6 +23,7 @@ export const AdHocFilterKey: FC<Props> = ({ datasource, onChange, filterKey }) =
value={filterKey}
onChange={onChange}
loadOptions={loadKeys}
inputMinWidth={MIN_WIDTH}
/>
</div>
);
@ -34,6 +36,7 @@ export const AdHocFilterKey: FC<Props> = ({ datasource, onChange, filterKey }) =
value={filterKey}
onChange={onChange}
loadOptions={loadKeysWithRemove}
inputMinWidth={MIN_WIDTH}
/>
</div>
);