From 1da457f5dfe33e32a2ef8d94a7a529966d4b0113 Mon Sep 17 00:00:00 2001 From: Aziz Chebbi <60013060+azizChebbi@users.noreply.github.com> Date: Mon, 18 Sep 2023 13:29:44 +0100 Subject: [PATCH] docs: remove onStateChange property from ComboBox (#14648) --- .../__snapshots__/PublicAPI-test.js.snap | 3 --- .../src/components/ComboBox/ComboBox.stories.js | 5 ----- .../react/src/components/ComboBox/ComboBox.tsx | 15 --------------- 3 files changed, 23 deletions(-) diff --git a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap index c1e124ed87f0..2aca1e2ac092 100644 --- a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap +++ b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap @@ -1292,9 +1292,6 @@ Map { "onInputChange": Object { "type": "func", }, - "onStateChange": Object { - "type": "func", - }, "onToggleClick": Object { "type": "func", }, diff --git a/packages/react/src/components/ComboBox/ComboBox.stories.js b/packages/react/src/components/ComboBox/ComboBox.stories.js index f143767675a1..dc6197a1d912 100644 --- a/packages/react/src/components/ComboBox/ComboBox.stories.js +++ b/packages/react/src/components/ComboBox/ComboBox.stories.js @@ -174,11 +174,6 @@ Playground.argTypes = { disable: true, }, }, - onStateChange: { - table: { - disable: true, - }, - }, onToggleClick: { table: { disable: true, diff --git a/packages/react/src/components/ComboBox/ComboBox.tsx b/packages/react/src/components/ComboBox/ComboBox.tsx index 1ae6a098d5b1..b35cd9b85a37 100644 --- a/packages/react/src/components/ComboBox/ComboBox.tsx +++ b/packages/react/src/components/ComboBox/ComboBox.tsx @@ -193,13 +193,6 @@ export interface ComboBoxProps */ onInputChange?: (inputText: string) => void; - /** - * Helper function passed to Downshift that allows the user to observe internal - * state changes - * `(changes, stateAndHelpers) => void` - */ - onStateChange?: (changes: object, stateAndHelpers: object) => void; - /** * Callback function that fires when the combobox menu toggle is clicked * `(evt) => void` @@ -293,7 +286,6 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { type: _type, warn, warnText, - onStateChange: _onStateChange, ...rest } = props; const prefix = usePrefix(); @@ -793,13 +785,6 @@ ComboBox.propTypes = { */ onInputChange: PropTypes.func, - /** - * Helper function passed to Downshift that allows the user to observe internal - * state changes - * `(changes, stateAndHelpers) => void` - */ - onStateChange: PropTypes.func, - /** * Callback function that fires when the combobox menu toggle is clicked * `(evt) => void`