`v88.3.0`⏩`v88.5.0` closes #151514 --- ## [`88.5.0`](https://github.com/elastic/eui/tree/v88.5.0) - Updated `EuiCallOut` with a new `onDismiss` prop ([#7156](https://github.com/elastic/eui/pull/7156)) - Added a new `renderCustomToolbar` prop to `EuiDataGrid`, which allows custom rendering of the toolbar. ([#7190](https://github.com/elastic/eui/pull/7190)) - Added a new `allowResetButton` prop to `toolbarVisibility.showDisplaySelector` of `EuiDataGrid`, which allows hiding the "Reset to default" button from the display settings popover. ([#7190](https://github.com/elastic/eui/pull/7190)) - Added a new `additionalDisplaySettings` prop to `toolbarVisibility.showDisplaySelector` of `EuiDataGrid`, which allows rendering extra settings inside the display settings popover. ([#7190](https://github.com/elastic/eui/pull/7190)) - Updated `EuiDataGrid`'s toolbar display settings button icon ([#7190](https://github.com/elastic/eui/pull/7190)) - Updated `EuiTextTruncate` with significantly improved iteration performance. Removed `measurementRenderAPI` prop, as `EuiTextTruncation` now only uses more performant canvas render API ([#7210](https://github.com/elastic/eui/pull/7210)) - Updated `EuiPopover` with a new configurable `repositionToCrossAxis` prop ([#7211](https://github.com/elastic/eui/pull/7211)) - Updated `EuiDatePicker` to support `compressed` input styling ([#7218](https://github.com/elastic/eui/pull/7218)) - Added `gradient` and `palette` icon glyphs. ([#7220](https://github.com/elastic/eui/pull/7220)) **Bug fixes** - Fixed `EuiPopover`'s missing animations on popover close ([#7211](https://github.com/elastic/eui/pull/7211)) - Fixed `EuiInputPopover` anchoring to the wrong side and missing shadows on smaller screens ([#7211](https://github.com/elastic/eui/pull/7211)) - Fixed `EuiSuperDatePicker` icon spacing on the quick select button ([#7217](https://github.com/elastic/eui/pull/7217)) - Fixed a missing type in `EuiMarkdownEditor`'s default processing plugins ([#7221](https://github.com/elastic/eui/pull/7221)) ## [`88.4.1`](https://github.com/elastic/eui/tree/v88.4.1) **Bug fixes** - Fixed missing `className`s on `EuiTextTruncate` ([#7212](https://github.com/elastic/eui/pull/7212)) - Fixed `title`s on `EuiComboBox` dropdown options to always be present ([#7212](https://github.com/elastic/eui/pull/7212)) - Fixed `EuiComboBox` truncation issues when search is an empty space ([#7212](https://github.com/elastic/eui/pull/7212)) ## [`88.4.0`](https://github.com/elastic/eui/tree/v88.4.0) - Updated `EuiComboBox` to allow configuring text truncation behavior via `truncationProps`. These props can be set on the entire combobox as well as on on individual dropdown options. ([#7028](https://github.com/elastic/eui/pull/7028)) - Updated `EuiInMemoryTable` with a new `searchFormat` prop (defaults to `eql`). When setting this prop to `text`, the built-in search bar will ignore EQL syntax and allow searching for plain strings with special characters and symbols. ([#7175](https://github.com/elastic/eui/pull/7175)) **Bug fixes** - `EuiComboBox` now always shows the highlighted search text, even on truncated text ([#7028](https://github.com/elastic/eui/pull/7028)) - Fixed missing i18n in `EuiSearchBar`'s default placeholder and aria-label text ([#7175](https://github.com/elastic/eui/pull/7175)) - Fixed the inline compressed styles of `EuiDescriptionListTitle` to use a taller line-height for readability ([#7185](https://github.com/elastic/eui/pull/7185)) - Fixed `EuiComboBox` to correctly truncate selected items when displayed as pills and plain text ([#7193](https://github.com/elastic/eui/pull/7193)) **Accessibility** - Added `aria-current` attribute to `EuiTablePagination` ([#7186](https://github.com/elastic/eui/pull/7186)) **CSS-in-JS conversions** - Converted `EuiDroppable` and `EuiDraggable` to Emotion; Removed `$euiDragAndDropSpacing` Sass variables ([#7187](https://github.com/elastic/eui/pull/7187)) --------- Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com> Co-authored-by: Jan Monschke <jan.monschke@elastic.co> Co-authored-by: Thomas Watson <watson@elastic.co> |
||
---|---|---|
.. | ||
src | ||
index.ts | ||
jest.config.js | ||
kibana.jsonc | ||
package.json | ||
README.md | ||
tsconfig.json |
Autocomplete Fields
Need an input that shows available index fields? Or an input that auto-completes based on a selected indexPattern field? Bingo! That's what these components are for. They are generalized enough so that they can be reused throughout and repurposed based on your needs.
All three of the available components rely on Eui's combo box.
useFieldValueAutocomplete
This hook uses the kibana services.data.autocomplete.getValueSuggestions()
service to return possible autocomplete fields based on the passed in indexPattern
and selectedField
.
FieldComponent
This component can be used to display available indexPattern fields. It requires an indexPattern to be passed in and will show an error state if value is not one of the available indexPattern fields. Users will be able to select only one option.
The onChange
handler is passed DataViewFieldBase[]
.
<FieldComponent
placeholder={i18n.FIELD_PLACEHOLDER}
indexPattern={indexPattern}
selectedField={selectedField}
isLoading={isLoading}
isClearable={isClearable}
onChange={handleFieldChange}
/>
OperatorComponent
This component can be used to display available operators. If you want to pass in your own operators, you can use operatorOptions
prop. If a operatorOptions
is provided, those will be used and it will ignore any of the built in logic that determines which operators to show. The operators within operatorOptions
will still need to be of type OperatorOption
.
If no operatorOptions
is provided, then the following behavior is observed:
- if
selectedField
type isboolean
, onlyis
,is not
,exists
,does not exist
operators will show - if
selectedField
type isnested
, onlyis
operator will show - if not one of the above, all operators will show (see
operators.ts
)
The onChange
handler is passed OperatorOption[]
.
<OperatorComponent
placeholder={i18n.OPERATOR_PLACEHOLDER}
selectedField={selectedField}
operator={selectedOperator}
isDisabled={iDisabled}
isLoading={isLoading}
isClearable={isClearable}
onChange={handleOperatorChange}
/>
AutocompleteFieldExistsComponent
This field value component is used when the selected operator is exists
or does not exist
. When these operators are selected, they are equivalent to using a wildcard. The combo box will be displayed as disabled.
<AutocompleteFieldExistsComponent placeholder={i18n.EXISTS_VALUE_PLACEHOLDER} />
AutocompleteFieldListsComponent
This component can be used to display available large value lists - when operator selected is is in list
or is not in list
. It relies on hooks from the lists
plugin. Users can only select one list and an error is shown if value is not one of available lists.
The selectedValue
should be the id
of the selected list.
This component relies on selectedField
to render available lists. The reason being that it relies on the selectedField
type to determine which lists to show as each large value list has a type as well. So if a user selects a field of type ip
, it will only display lists of type ip
.
The onChange
handler is passed ListSchema
.
<AutocompleteFieldListsComponent
selectedField={selectedField}
placeholder={i18n.FIELD_LISTS_PLACEHOLDER}
selectedValue={id}
isLoading={isLoading}
isDisabled={iDisabled}
isClearable={isClearable}
onChange={handleFieldListValueChange}
/>
AutocompleteFieldMatchComponent
This component can be used to allow users to select one single value. It uses the autocomplete hook to display any autocomplete options based on the passed in indexPattern
, but also allows a user to add their own value.
It does some minor validation, assuring that field value is a date if selectedField
type is date
, a number if selectedField
type is number
, an ip if selectedField
type is ip
.
The onChange
handler is passed selected string
.
<AutocompleteFieldMatchComponent
placeholder={i18n.FIELD_VALUE_PLACEHOLDER}
selectedField={selectedField}
selectedValue={value}
isDisabled={iDisabled}
isLoading={isLoading}
isClearable={isClearable}
indexPattern={indexPattern}
onChange={handleFieldMatchValueChange}
/>
AutocompleteFieldMatchAnyComponent
This component can be used to allow users to select multiple values. It uses the autocomplete hook to display any autocomplete options based on the passed in indexPattern
, but also allows a user to add their own values.
It does some minor validation, assuring that field values are a date if selectedField
type is date
, numbers if selectedField
type is number
, ips if selectedField
type is ip
.
The onChange
handler is passed selected string[]
.
<AutocompleteFieldMatchAnyComponent
placeholder={i18n.FIELD_VALUE_PLACEHOLDER}
selectedField={selectedField}
selectedValue={values}
isDisabled={false}
isLoading={isLoading}
isClearable={false}
indexPattern={indexPattern}
onChange={handleFieldMatchAnyValueChange}
/>
AutocompleteFieldWildcardComponent
This component can be used to allow users to select a single value. It uses the autocomplete hook to display any autocomplete options based on the passed in indexPattern
, but also allows a user to add their own value.
The onChange
handler is passed selected string[]
.
<AutocompleteFieldWildcardComponent
placeholder={i18n.FIELD_VALUE_PLACEHOLDER}
selectedField={selectedField}
selectedValue={values}
isDisabled={false}
isLoading={isLoading}
isClearable={false}
indexPattern={indexPattern}
onChange={handleFieldMatchAnyValueChange}
warning='input warning'
/>