mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[ES|QL] Makes the controls values clearable (#217132)
## Summary Closes https://github.com/elastic/kibana/issues/217077 Adds a clear button in the values dropdowns <img width="400" alt="image" src="https://github.com/user-attachments/assets/79d3f615-9ce1-4caa-be65-99895bb35d49" /> <img width="373" alt="image" src="https://github.com/user-attachments/assets/d4edab35-18a4-477c-afb3-a4b316db1a40" />
This commit is contained in:
parent
1db06dc93c
commit
400a91464d
2 changed files with 13 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
|||
|
||||
import React, { useCallback, useState, useEffect } from 'react';
|
||||
import useMountedState from 'react-use/lib/useMountedState';
|
||||
import { css } from '@emotion/react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { isEqual } from 'lodash';
|
||||
import {
|
||||
|
@ -207,6 +208,13 @@ export function IdentifierControlForm({
|
|||
data-test-subj="esqlIdentifiersOptions"
|
||||
fullWidth
|
||||
compressed
|
||||
isClearable
|
||||
css={css`
|
||||
.euiFormControlLayoutIcons {
|
||||
align-items: flex-start;
|
||||
padding-block-start: 1ch;
|
||||
}
|
||||
`}
|
||||
/>
|
||||
</EuiFormRow>
|
||||
|
||||
|
|
|
@ -337,11 +337,16 @@ export function ValueControlForm({
|
|||
selectedOptions={selectedValues}
|
||||
onChange={onValuesChange}
|
||||
onCreateOption={onCreateOption}
|
||||
isClearable
|
||||
fullWidth
|
||||
compressed
|
||||
css={css`
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
.euiFormControlLayoutIcons {
|
||||
align-items: flex-start;
|
||||
padding-block-start: 1ch;
|
||||
}
|
||||
`}
|
||||
/>
|
||||
</EuiFormRow>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue