@@ -12,6 +12,7 @@ import {
1212import {
1313 Container ,
1414 Content ,
15+ SearchAndValuesWrapper ,
1516 SearchField ,
1617 SearchFieldWrapper ,
1718 Section ,
@@ -133,39 +134,41 @@ export function Filter<T extends string>({
133134 data = { search_icon }
134135 color = { colors . text . static_icons__tertiary . rgba }
135136 />
136- { ( Object . keys ( values ) as Array < T > ) . flatMap ( ( key ) =>
137- values [ key ] . map ( ( { label, icon } , index , list ) => (
138- < StyledChip
139- key = { `${ label } -${ index } -${ key } ` }
140- onDelete = { ( ) => onClearFilter ( key , index ) }
141- leadingIconData = { icon }
142- $tryingToRemove = {
143- attemptingToRemove === key && index === list . length - 1
144- }
145- >
146- { label }
147- </ StyledChip >
148- ) )
149- ) }
150- < SearchFieldWrapper >
151- { 'autoCompleteOptions' in rest && rest . autoCompleteOptions && (
152- < AutoCompleteText
153- search = { search }
154- autoCompleteOptions = { rest . autoCompleteOptions }
155- />
137+ < SearchAndValuesWrapper >
138+ { ( Object . keys ( values ) as Array < T > ) . flatMap ( ( key ) =>
139+ values [ key ] . map ( ( { label, icon } , index , list ) => (
140+ < StyledChip
141+ key = { `${ label } -${ index } -${ key } ` }
142+ onDelete = { ( ) => onClearFilter ( key , index ) }
143+ leadingIconData = { icon }
144+ $tryingToRemove = {
145+ attemptingToRemove === key && index === list . length - 1
146+ }
147+ >
148+ { label }
149+ </ StyledChip >
150+ ) )
156151 ) }
157- < SearchField
158- ref = { searchRef }
159- id = { `filter-search-${ id } ` }
160- type = "search"
161- autoComplete = "off"
162- value = { search }
163- placeholder = { hasAnyValues ? undefined : placeholder }
164- onChange = { onSearchChange }
165- onKeyDownCapture = { handleOnKeyDown }
166- onFocus = { handleOnFocus }
167- />
168- </ SearchFieldWrapper >
152+ < SearchFieldWrapper >
153+ { 'autoCompleteOptions' in rest && rest . autoCompleteOptions && (
154+ < AutoCompleteText
155+ search = { search }
156+ autoCompleteOptions = { rest . autoCompleteOptions }
157+ />
158+ ) }
159+ < SearchField
160+ ref = { searchRef }
161+ id = { `filter-search-${ id } ` }
162+ type = "search"
163+ autoComplete = "off"
164+ value = { search }
165+ placeholder = { hasAnyValues ? undefined : placeholder }
166+ onChange = { onSearchChange }
167+ onKeyDownCapture = { handleOnKeyDown }
168+ onFocus = { handleOnFocus }
169+ />
170+ </ SearchFieldWrapper >
171+ </ SearchAndValuesWrapper >
169172 { ( Object . values ( values ) as SelectOptionRequired [ ] [ ] ) . some (
170173 ( list ) => list . length > 0
171174 ) && (
0 commit comments