Skip to content

Commit

Permalink
[8.x] [ML] Adds ability to toggle visibility for empty fields when ch…
Browse files Browse the repository at this point in the history
…oosing an aggregation or field in Anomaly detection, data frame analytics (#186670) (#196180)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML] Adds ability to toggle visibility for empty fields when choosing
an aggregation or field in Anomaly detection, data frame analytics
(#186670)](#186670)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Quynh Nguyen
(Quinn)","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-14T16:17:38Z","message":"[ML]
Adds ability to toggle visibility for empty fields when choosing an
aggregation or field in Anomaly detection, data frame analytics
(#186670)\n\n## Summary\r\n\r\nThis PR adds new ability to toggle
visibility for empty fields when\r\nchoosing an aggregation or field in
Anomaly detection and Data
frame\r\nanalytics\r\n\r\n\r\nhttps://github.com/user-attachments/assets/c3763b6b-b09d-44b1-bd83-6ee418f0602e\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/5d8b0788-dd59-44e4-b324-3a4035b7a0ec\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is
usable by keyboard only (learn more\r\nabout [keyboard
accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI
touched in this PR does not create any new axe failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[ ] If a plugin configuration key changed, check if it needs to
be\r\nallowlisted in the cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
Risk Matrix\r\n\r\nDelete this section if it is not applicable to this
PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other
developers to\r\nidentify risks that should be tested prior to the
change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider
some of the following examples\r\nand how they may potentially impact
the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes
|\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n|
Multiple Spaces&mdash;unexpected behavior in non-default Kibana
Space.\r\n| Low | High | Integration tests will verify that all features
are still\r\nsupported in non-default Kibana Space and when user
switches between\r\nspaces. |\r\n| Multiple nodes&mdash;Elasticsearch
polling might have race conditions\r\nwhen multiple Kibana nodes are
polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so
executing them multiple times will not result\r\nin logical error, but
will degrade performance. To test for this case we\r\nadd plenty of unit
tests around this logic and document manual testing\r\nprocedure. |\r\n|
Code should gracefully handle cases when feature X or plugin Y
are\r\ndisabled. | Medium | High | Unit tests will verify that any
feature flag\r\nor plugin combination still results in our service
operational. |\r\n| [See more potential
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
|\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for
breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"f922089c5f088738acd30aeb17de7c7ec07604ce","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement",":ml","Feature:Anomaly
Detection","Feature:Data Frame
Analytics","v9.0.0","backport:prev-major","v8.16.0","backport:current-major"],"title":"[ML]
Adds ability to toggle visibility for empty fields when choosing an
aggregation or field in Anomaly detection, data frame
analytics","number":186670,"url":"https://github.com/elastic/kibana/pull/186670","mergeCommit":{"message":"[ML]
Adds ability to toggle visibility for empty fields when choosing an
aggregation or field in Anomaly detection, data frame analytics
(#186670)\n\n## Summary\r\n\r\nThis PR adds new ability to toggle
visibility for empty fields when\r\nchoosing an aggregation or field in
Anomaly detection and Data
frame\r\nanalytics\r\n\r\n\r\nhttps://github.com/user-attachments/assets/c3763b6b-b09d-44b1-bd83-6ee418f0602e\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/5d8b0788-dd59-44e4-b324-3a4035b7a0ec\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is
usable by keyboard only (learn more\r\nabout [keyboard
accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI
touched in this PR does not create any new axe failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[ ] If a plugin configuration key changed, check if it needs to
be\r\nallowlisted in the cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
Risk Matrix\r\n\r\nDelete this section if it is not applicable to this
PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other
developers to\r\nidentify risks that should be tested prior to the
change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider
some of the following examples\r\nand how they may potentially impact
the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes
|\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n|
Multiple Spaces&mdash;unexpected behavior in non-default Kibana
Space.\r\n| Low | High | Integration tests will verify that all features
are still\r\nsupported in non-default Kibana Space and when user
switches between\r\nspaces. |\r\n| Multiple nodes&mdash;Elasticsearch
polling might have race conditions\r\nwhen multiple Kibana nodes are
polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so
executing them multiple times will not result\r\nin logical error, but
will degrade performance. To test for this case we\r\nadd plenty of unit
tests around this logic and document manual testing\r\nprocedure. |\r\n|
Code should gracefully handle cases when feature X or plugin Y
are\r\ndisabled. | Medium | High | Unit tests will verify that any
feature flag\r\nor plugin combination still results in our service
operational. |\r\n| [See more potential
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
|\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for
breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"f922089c5f088738acd30aeb17de7c7ec07604ce"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/186670","number":186670,"mergeCommit":{"message":"[ML]
Adds ability to toggle visibility for empty fields when choosing an
aggregation or field in Anomaly detection, data frame analytics
(#186670)\n\n## Summary\r\n\r\nThis PR adds new ability to toggle
visibility for empty fields when\r\nchoosing an aggregation or field in
Anomaly detection and Data
frame\r\nanalytics\r\n\r\n\r\nhttps://github.com/user-attachments/assets/c3763b6b-b09d-44b1-bd83-6ee418f0602e\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/5d8b0788-dd59-44e4-b324-3a4035b7a0ec\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is
usable by keyboard only (learn more\r\nabout [keyboard
accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI
touched in this PR does not create any new axe failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[ ] If a plugin configuration key changed, check if it needs to
be\r\nallowlisted in the cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
Risk Matrix\r\n\r\nDelete this section if it is not applicable to this
PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other
developers to\r\nidentify risks that should be tested prior to the
change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider
some of the following examples\r\nand how they may potentially impact
the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes
|\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n|
Multiple Spaces&mdash;unexpected behavior in non-default Kibana
Space.\r\n| Low | High | Integration tests will verify that all features
are still\r\nsupported in non-default Kibana Space and when user
switches between\r\nspaces. |\r\n| Multiple nodes&mdash;Elasticsearch
polling might have race conditions\r\nwhen multiple Kibana nodes are
polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so
executing them multiple times will not result\r\nin logical error, but
will degrade performance. To test for this case we\r\nadd plenty of unit
tests around this logic and document manual testing\r\nprocedure. |\r\n|
Code should gracefully handle cases when feature X or plugin Y
are\r\ndisabled. | Medium | High | Unit tests will verify that any
feature flag\r\nor plugin combination still results in our service
operational. |\r\n| [See more potential
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
|\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for
breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"f922089c5f088738acd30aeb17de7c7ec07604ce"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Quynh Nguyen (Quinn) <[email protected]>
  • Loading branch information
kibanamachine and qn895 authored Oct 14, 2024
1 parent 77f2411 commit df849c5
Show file tree
Hide file tree
Showing 34 changed files with 697 additions and 276 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ export const FieldStatsFlyoutProvider: FC<FieldStatsFlyoutProviderProps> = (prop
// Get all field names for each returned doc and flatten it
// to a list of unique field names used across all docs.
const fieldsWithData = new Set(docs.map(Object.keys).flat(1));

manager.set(cacheKey, fieldsWithData);
if (!unmounted) {
setPopulatedFields(fieldsWithData);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export const FieldStatsInfoButton: FC<FieldStatsInfoButtonProps> = (props) => {
defaultMessage: '(no data found in 1000 sample records)',
})
: '';

return (
<EuiFlexGroup gutterSize="none" alignItems="center">
<EuiFlexItem grow={false}>
Expand Down Expand Up @@ -135,22 +136,22 @@ export const FieldStatsInfoButton: FC<FieldStatsInfoButtonProps> = (props) => {
grow={false}
css={{
paddingRight: themeVars.euiTheme.euiSizeXS,
paddingBottom: themeVars.euiTheme.euiSizeXS,
}}
>
<FieldIcon
color={isEmpty ? themeVars.euiTheme.euiColorDisabled : undefined}
type={getKbnFieldIconType(field.type)}
fill="none"
/>
{!hideTrigger ? (
<FieldIcon
color={isEmpty ? themeVars.euiTheme.euiColorDisabled : undefined}
type={getKbnFieldIconType(field.type)}
fill="none"
/>
) : null}
</EuiFlexItem>
<EuiText
color={isEmpty ? 'subdued' : undefined}
size="s"
aria-label={label}
title={label}
className="euiComboBoxOption__content"
css={{ paddingBottom: themeVars.euiTheme.euiSizeXS }}
>
{label}
</EuiText>
Expand Down
7 changes: 3 additions & 4 deletions x-pack/packages/ml/field_stats_flyout/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export {
type FieldStatsInfoButtonProps,
} from './field_stats_info_button';
export { useFieldStatsTrigger } from './use_field_stats_trigger';
export {
EuiComboBoxWithFieldStats,
type EuiComboBoxWithFieldStatsProps,
} from './eui_combo_box_with_field_stats';

export { OptionListWithFieldStats } from './options_list_with_stats/option_list_with_stats';
export type { DropDownLabel } from './options_list_with_stats/types';
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import type { FC } from 'react';
import React, { useMemo, useState, useEffect } from 'react';
import { isDefined } from '@kbn/ml-is-defined';
import type {
EuiComboBoxOptionOption,
EuiComboBoxSingleSelectionShape,
EuiSelectableOption,
} from '@elastic/eui';
import { EuiFlexItem, EuiSelectable, htmlIdGenerator } from '@elastic/eui';
import { css } from '@emotion/react';
import { type DropDownLabel } from './types';
import { useFieldStatsFlyoutContext } from '../use_field_stats_flyout_context';
import { OptionsListPopoverFooter } from './option_list_popover_footer';

interface OptionsListPopoverProps {
options: DropDownLabel[];
renderOption: (option: DropDownLabel) => React.ReactNode;
singleSelection?: boolean | EuiComboBoxSingleSelectionShape;
onChange?:
| ((newSuggestions: DropDownLabel[]) => void)
| ((
newSuggestions: Array<EuiComboBoxOptionOption<string | number | string[] | undefined>>
) => void);
setPopoverOpen: (open: boolean) => void;
isLoading?: boolean;
}

interface OptionsListPopoverSuggestionsProps {
options: DropDownLabel[];
renderOption: (option: DropDownLabel) => React.ReactNode;
singleSelection?: boolean | EuiComboBoxSingleSelectionShape;
onChange?:
| ((newSuggestions: DropDownLabel[]) => void)
| ((
newSuggestions: Array<EuiComboBoxOptionOption<string | number | string[] | undefined>>
) => void);
setPopoverOpen: (open: boolean) => void;
}
const OptionsListPopoverSuggestions: FC<OptionsListPopoverSuggestionsProps> = ({
options,
renderOption,
singleSelection,
onChange,
setPopoverOpen,
}) => {
const [selectableOptions, setSelectableOptions] = useState<DropDownLabel[]>([]); // will be set in following useEffect
useEffect(() => {
/* This useEffect makes selectableOptions responsive to search, show only selected, and clear selections */
const _selectableOptions = (options ?? []).map((suggestion) => {
const key = suggestion.label ?? suggestion.field?.id;
return {
...suggestion,
key,
checked: undefined,
'data-test-subj': `optionsListControlSelection-${key}`,
};
});
setSelectableOptions(_selectableOptions);
}, [options]);

return (
<EuiSelectable
searchProps={{ 'data-test-subj': 'optionsListFilterInput' }}
singleSelection={Boolean(singleSelection)}
searchable
options={selectableOptions as Array<EuiSelectableOption<string>>}
renderOption={renderOption}
listProps={{ onFocusBadge: false }}
onChange={(opts, _, changedOption) => {
const option = changedOption as DropDownLabel;
if (singleSelection) {
if (onChange) {
onChange([option as EuiComboBoxOptionOption<string | number | string[] | undefined>]);
setPopoverOpen(false);
}
} else {
if (onChange) {
onChange([option as EuiComboBoxOptionOption<string | number | string[] | undefined>]);
setPopoverOpen(false);
}
}
}}
>
{(list, search) => (
<>
{search}
{list}
</>
)}
</EuiSelectable>
);
};

export const OptionsListPopover = ({
options,
renderOption,
singleSelection,
onChange,
setPopoverOpen,
isLoading,
}: OptionsListPopoverProps) => {
const { populatedFields } = useFieldStatsFlyoutContext();

const [showEmptyFields, setShowEmptyFields] = useState(false);
const id = useMemo(() => htmlIdGenerator()(), []);

const filteredOptions = useMemo(() => {
return showEmptyFields
? options
: options.filter((option) => {
if (isDefined(option['data-is-empty'])) {
return !option['data-is-empty'];
}
if (
Object.hasOwn(option, 'isGroupLabel') ||
Object.hasOwn(option, 'isGroupLabelOption')
) {
const key = option.key ?? option.searchableLabel;
return key ? populatedFields?.has(key) : false;
}
if (option.field) {
return populatedFields?.has(option.field.id);
}
return true;
});
}, [options, showEmptyFields, populatedFields]);
return (
<div
id={`control-popover-${id}`}
className={'optionsList__popover'}
data-test-subj={`optionsListControlPopover`}
>
<EuiFlexItem
data-test-subj={`optionsListControlAvailableOptions`}
css={css({ width: '100%', height: '100%' })}
>
<OptionsListPopoverSuggestions
renderOption={renderOption}
options={filteredOptions}
singleSelection={singleSelection}
onChange={onChange}
setPopoverOpen={setPopoverOpen}
/>
</EuiFlexItem>
<OptionsListPopoverFooter
showEmptyFields={showEmptyFields}
setShowEmptyFields={setShowEmptyFields}
isLoading={isLoading}
/>
</div>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import React from 'react';
import type { FC } from 'react';
import { EuiPopoverFooter, EuiSwitch, EuiProgress, useEuiBackgroundColor } from '@elastic/eui';
import { css } from '@emotion/react';
import { i18n } from '@kbn/i18n';
import { euiThemeVars } from '@kbn/ui-theme';

export const OptionsListPopoverFooter: FC<{
showEmptyFields: boolean;
setShowEmptyFields: (showEmptyFields: boolean) => void;
isLoading?: boolean;
}> = ({ showEmptyFields, setShowEmptyFields, isLoading }) => {
return (
<EuiPopoverFooter
paddingSize="none"
css={css({
height: euiThemeVars.euiButtonHeight,
backgroundColor: useEuiBackgroundColor('subdued'),
alignItems: 'center',
display: 'flex',
paddingLeft: euiThemeVars.euiSizeS,
})}
>
{isLoading ? (
// @ts-expect-error css should be ok
<div css={css({ position: 'absolute', width: '100%' })}>
<EuiProgress
data-test-subj="optionsList-control-popover-loading"
size="xs"
color="accent"
/>
</div>
) : null}

<EuiSwitch
data-test-subj="optionsListIncludeEmptyFields"
label={i18n.translate('xpack.ml.controls.optionsList.popover.includeEmptyFieldsLabel', {
defaultMessage: 'Include empty fields',
})}
checked={showEmptyFields}
onChange={(e) => setShowEmptyFields(e.target.checked)}
/>
</EuiPopoverFooter>
);
};
Loading

0 comments on commit df849c5

Please sign in to comment.