@@ -84,8 +84,8 @@ const SearchInputElement = tasty({
8484 ...DEFAULT_INPUT_STYLES ,
8585 fill : '#clear' ,
8686 padding : {
87- '' : '.5x 1.5x' ,
88- prefix : '.5x 1.5x .5x .5x' ,
87+ '' : '0 1.5x' ,
88+ prefix : '0 1.5x 0 .5x' ,
8989 } ,
9090 } ,
9191} ) ;
@@ -194,6 +194,7 @@ export const FilterListBox = forwardRef(function FilterListBox<
194194 description,
195195 styles,
196196 focusOnHover,
197+ shouldFocusWrap,
197198 labelSuffix,
198199 selectedKey,
199200 defaultSelectedKey,
@@ -607,7 +608,7 @@ export const FilterListBox = forwardRef(function FilterListBox<
607608 const newIndex = currentIndex + direction ;
608609 if ( newIndex >= 0 && newIndex < visibleKeys . length ) {
609610 nextKey = visibleKeys [ newIndex ] ;
610- } else {
611+ } else if ( shouldFocusWrap ) {
611612 // Wrap around
612613 nextKey = isArrowDown
613614 ? visibleKeys [ 0 ]
@@ -715,6 +716,7 @@ export const FilterListBox = forwardRef(function FilterListBox<
715716 focused : isFocused ,
716717 loading : ! ! isLoading ,
717718 searchable : true ,
719+ prefix : ! ! isLoading ,
718720 ...externalMods ,
719721 } ) ,
720722 [
@@ -784,7 +786,14 @@ export const FilterListBox = forwardRef(function FilterListBox<
784786 } ;
785787
786788 const searchInput = (
787- < SearchWrapperElement mods = { mods } data-size = "small" >
789+ < SearchWrapperElement mods = { mods } data-size = { size } >
790+ { isLoading && (
791+ < div data-element = "Prefix" >
792+ < div data-element = "InputIcon" >
793+ { isLoading ? < LoadingIcon /> : null }
794+ </ div >
795+ </ div >
796+ ) }
788797 < SearchInputElement
789798 ref = { searchInputRef }
790799 data-is-prefix = { isLoading ? '' : undefined }
@@ -811,13 +820,6 @@ export const FilterListBox = forwardRef(function FilterListBox<
811820 { ...keyboardProps }
812821 { ...modAttrs ( mods ) }
813822 />
814- { isLoading && (
815- < div data-element = "Prefix" >
816- < div data-element = "InputIcon" >
817- { isLoading ? < LoadingIcon /> : null }
818- </ div >
819- </ div >
820- ) }
821823 </ SearchWrapperElement >
822824 ) ;
823825
@@ -856,6 +858,7 @@ export const FilterListBox = forwardRef(function FilterListBox<
856858 listRef = { listRef }
857859 stateRef = { listStateRef }
858860 listStyles = { listStyles }
861+ shouldFocusWrap = { shouldFocusWrap }
859862 optionStyles = { optionStyles }
860863 sectionStyles = { sectionStyles }
861864 headingStyles = { headingStyles }
0 commit comments