Skip to content
Draft
Prev Previous commit
Fix missing label on link input. Only search if 2 or more chars
  • Loading branch information
jeryj committed Nov 21, 2025
commit ccd8c06e53117aac2b3d7860dc18a5a27e181ab5
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ export const EntitySearch = forwardRef(
return;
}

// Only search if term is empty (initial suggestions) or has 2+ characters
if ( term.length === 1 ) {
// Don't search with single character, keep showing previous results
return;
}

setIsLoading( true );
onSearch( term )
.then( ( results ) => {
Expand Down Expand Up @@ -275,7 +281,6 @@ export const EntitySearch = forwardRef(
}
} }
isLoading={ isLoading }
hideLabelFromVision
expandOnFocus={ false }
placeholder={ __( 'Search or type URL' ) }
__experimentalRenderItem={ ( { item } ) => {
Expand Down
Loading