@@ -84,8 +84,8 @@ const SearchInputElement = tasty({
84
84
...DEFAULT_INPUT_STYLES ,
85
85
fill : '#clear' ,
86
86
padding : {
87
- '' : '.5x 1.5x' ,
88
- prefix : '.5x 1.5x .5x .5x' ,
87
+ '' : '0 1.5x' ,
88
+ prefix : '0 1.5x 0 .5x' ,
89
89
} ,
90
90
} ,
91
91
} ) ;
@@ -194,6 +194,7 @@ export const FilterListBox = forwardRef(function FilterListBox<
194
194
description,
195
195
styles,
196
196
focusOnHover,
197
+ shouldFocusWrap,
197
198
labelSuffix,
198
199
selectedKey,
199
200
defaultSelectedKey,
@@ -607,7 +608,7 @@ export const FilterListBox = forwardRef(function FilterListBox<
607
608
const newIndex = currentIndex + direction ;
608
609
if ( newIndex >= 0 && newIndex < visibleKeys . length ) {
609
610
nextKey = visibleKeys [ newIndex ] ;
610
- } else {
611
+ } else if ( shouldFocusWrap ) {
611
612
// Wrap around
612
613
nextKey = isArrowDown
613
614
? visibleKeys [ 0 ]
@@ -715,6 +716,7 @@ export const FilterListBox = forwardRef(function FilterListBox<
715
716
focused : isFocused ,
716
717
loading : ! ! isLoading ,
717
718
searchable : true ,
719
+ prefix : ! ! isLoading ,
718
720
...externalMods ,
719
721
} ) ,
720
722
[
@@ -784,7 +786,14 @@ export const FilterListBox = forwardRef(function FilterListBox<
784
786
} ;
785
787
786
788
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
+ ) }
788
797
< SearchInputElement
789
798
ref = { searchInputRef }
790
799
data-is-prefix = { isLoading ? '' : undefined }
@@ -811,13 +820,6 @@ export const FilterListBox = forwardRef(function FilterListBox<
811
820
{ ...keyboardProps }
812
821
{ ...modAttrs ( mods ) }
813
822
/>
814
- { isLoading && (
815
- < div data-element = "Prefix" >
816
- < div data-element = "InputIcon" >
817
- { isLoading ? < LoadingIcon /> : null }
818
- </ div >
819
- </ div >
820
- ) }
821
823
</ SearchWrapperElement >
822
824
) ;
823
825
@@ -856,6 +858,7 @@ export const FilterListBox = forwardRef(function FilterListBox<
856
858
listRef = { listRef }
857
859
stateRef = { listStateRef }
858
860
listStyles = { listStyles }
861
+ shouldFocusWrap = { shouldFocusWrap }
859
862
optionStyles = { optionStyles }
860
863
sectionStyles = { sectionStyles }
861
864
headingStyles = { headingStyles }
0 commit comments