Skip to content

Commit

Permalink
more euiswitch fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
thompsongl committed Oct 31, 2019
1 parent ca17c1e commit 1026353
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ describe('DiscoverFieldSearch', () => {
// @ts-ignore
(aggregtableButtonGroup.props() as EuiButtonGroupProps).onChange('aggregatable-true', null);
});
missingSwitch.simulate('change', { target: { value: false } });
missingSwitch.simulate('click');
expect(onChange).toBeCalledTimes(2);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
EuiPopoverTitle,
EuiSelect,
EuiSwitch,
EuiSwitchEvent,
EuiForm,
EuiFormRow,
EuiButtonGroup,
Expand Down Expand Up @@ -153,7 +154,7 @@ export function DiscoverFieldSearch({ onChange, value, types }: Props) {
setActiveFiltersCount(activeFiltersCount + diff);
};

const handleMissingChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const handleMissingChange = (e: EuiSwitchEvent) => {
const missingValue = e.target.checked;
handleValueChange('missing', missingValue);
};
Expand Down

0 comments on commit 1026353

Please sign in to comment.