Skip to content

Commit

Permalink
Revert "Only show "No items found" when isLoading is false"
Browse files Browse the repository at this point in the history
This reverts commit 76488c1.
  • Loading branch information
adamsilverstein committed Jan 31, 2025
1 parent 736c5ff commit fd97afc
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 11 deletions.
1 change: 0 additions & 1 deletion packages/components/src/combobox-control/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,6 @@ function ComboboxControl( props: ComboboxControlProps ) {
__experimentalRenderItem={
__experimentalRenderItem
}
isLoading={ isLoading }
/>
) }
</div>
Expand Down
2 changes: 0 additions & 2 deletions packages/components/src/form-token-field/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export function FormTokenField( props: FormTokenFieldProps ) {
__experimentalAutoSelectFirstMatch = false,
__nextHasNoMarginBottom = false,
tokenizeOnBlur = false,
isLoading = false,
} = useDeprecated36pxDefaultSizeProp< FormTokenFieldProps >( props );

if ( ! __nextHasNoMarginBottom ) {
Expand Down Expand Up @@ -744,7 +743,6 @@ export function FormTokenField( props: FormTokenFieldProps ) {
onHover={ onSuggestionHovered }
onSelect={ onSuggestionSelected }
__experimentalRenderItem={ __experimentalRenderItem }
isLoading={ isLoading }
/>
) }
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export function SuggestionsList<
suggestions = [],
displayTransform,
instanceId,
isLoading,
__experimentalRenderItem,
}: SuggestionsListProps< T > ) {
const listRef = useRefEffect< HTMLUListElement >(
Expand Down Expand Up @@ -158,7 +157,7 @@ export function SuggestionsList<
);
/* eslint-enable jsx-a11y/click-events-have-key-events */
} ) }
{ suggestions.length === 0 && ! isLoading && (
{ suggestions.length === 0 && (
<li className="components-form-token-field__suggestion is-empty">
{ __( 'No items found' ) }
</li>
Expand Down
6 changes: 0 additions & 6 deletions packages/components/src/form-token-field/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,6 @@ export interface FormTokenFieldProps
* @default false
*/
tokenizeOnBlur?: boolean;

/**
* Is the component loading data?
*/
isLoading?: boolean;
}

/**
Expand All @@ -212,7 +207,6 @@ export interface SuggestionsListProps<
displayTransform: ( value: T ) => string;
instanceId: string | number;
__experimentalRenderItem?: ( args: { item: T } ) => ReactNode;
isLoading?: boolean;
}

export interface TokenProps extends TokenItem {
Expand Down

0 comments on commit fd97afc

Please sign in to comment.