From d72a94cf33052c6364f558f84de2ece41ea1c399 Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Fri, 31 Jan 2025 09:34:05 -0700 Subject: [PATCH] Revert combobox changes --- packages/components/src/combobox-control/README.md | 10 +--------- packages/components/src/combobox-control/index.tsx | 5 +---- .../src/combobox-control/stories/index.story.tsx | 1 - packages/components/src/combobox-control/types.ts | 6 ------ 4 files changed, 2 insertions(+), 20 deletions(-) diff --git a/packages/components/src/combobox-control/README.md b/packages/components/src/combobox-control/README.md index 7a11c8b95fe2e9..4089cf9c56e9b5 100644 --- a/packages/components/src/combobox-control/README.md +++ b/packages/components/src/combobox-control/README.md @@ -39,7 +39,6 @@ function MyComboboxControl() { label="Font Size" value={ fontSize } onChange={ setFontSize } - isLoading={ isLoading } options={ filteredOptions } onFilterValueChange={ ( inputValue ) => setFilteredOptions( @@ -113,20 +112,13 @@ If the control is clicked, the dropdown will expand regardless of this prop. - Required: No - Default: `true` -#### placeholder +### placeholder If passed, the combobox input will show a placeholder string if no values are present. - Type: `string` - Required: No -#### isLoading - -Show a spinner (and hide the suggestions dropdown) while data about the matching suggestions (ie the `options` prop) is loading - -- Type: `Boolean` -- Required: No - #### __experimentalRenderItem Custom renderer invoked for each option in the suggestion list. The render prop receives as its argument an object containing, under the `item` key, the single option's data (directly from the array of data passed to the `options` prop). diff --git a/packages/components/src/combobox-control/index.tsx b/packages/components/src/combobox-control/index.tsx index 9c6bd2a4d75dd2..28510c8653d02e 100644 --- a/packages/components/src/combobox-control/index.tsx +++ b/packages/components/src/combobox-control/index.tsx @@ -35,7 +35,6 @@ import type { TokenInputProps } from '../form-token-field/types'; import { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props'; import { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events'; import { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size'; -import Spinner from '../spinner'; const noop = () => {}; @@ -127,7 +126,6 @@ function ComboboxControl( props: ComboboxControlProps ) { help, allowReset = true, className, - isLoading = false, messages = { selected: __( 'Item selected.' ), }, @@ -364,7 +362,6 @@ function ComboboxControl( props: ComboboxControlProps ) { onChange={ onInputChange } /> - { isLoading && } { allowReset && (