From 0a58a2e73bff311687c5e47c5560b890646b876c Mon Sep 17 00:00:00 2001 From: Chandler Prall Date: Mon, 27 Aug 2018 11:13:18 -0600 Subject: [PATCH 1/2] Update the typedef for EuiSwitch's onChange prop --- src/components/form/switch/index.d.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/form/switch/index.d.ts b/src/components/form/switch/index.d.ts index 2e6aac98184..f3c67f8c25e 100644 --- a/src/components/form/switch/index.d.ts +++ b/src/components/form/switch/index.d.ts @@ -6,12 +6,9 @@ declare module '@elastic/eui' { /** * @see './switch.js' */ - export type EuiSwitchChangeCallback = (state: boolean) => void; - export type EuiSwitchProps = CommonProps & - Omit, 'onChange'> & { + InputHTMLAttributes & { label?: ReactNode; - onChange?: EuiSwitchChangeCallback; }; export const EuiSwitch: SFC; From 484b7e0bc4cd6603ea26a5c40bb0c0dac8d8a9b2 Mon Sep 17 00:00:00 2001 From: Chandler Prall Date: Mon, 27 Aug 2018 11:16:53 -0600 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b23de32135..981f3818c33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,11 @@ ## [`master`](https://github.com/elastic/eui/tree/master) -No public interface changes since `3.7.0`. - - Added color and monotone icons for AWS and GCP. ([#1135](https://github.com/elastic/eui/pull/1135)) +**Bug fixes** + +- Fixed `onChange` typedef on `EuiSwitch` ([#1144](https://github.com/elastic/eui/pull/1144) + ## [`3.7.0`](https://github.com/elastic/eui/tree/v3.7.0) - Added `zIndexAdjustment` to `EuiPopover` which allows tweaking the popover content's `z-index` ([#1097](https://github.com/elastic/eui/pull/1097))