File tree 3 files changed +101
-117
lines changed
3 files changed +101
-117
lines changed Original file line number Diff line number Diff line change 5
5
---
6
6
7
7
fix(ga): issue #606 - search inconsistent
8
+ - add debounce on input search field
9
+ - fixed an issue on infinite scroll
Original file line number Diff line number Diff line change @@ -27,12 +27,12 @@ export function SearchField() {
27
27
28
28
const debounceSearch = useCallback (
29
29
debounce (
30
- ( newSearchTerm : string ) =>
30
+ ( newSearchTerm : string , productFilters : string [ ] , componentFilters : string [ ] ) =>
31
31
actions . searchTree ( {
32
32
query : newSearchTerm ,
33
33
filters : {
34
- product : appState . selectedProductFilters ,
35
- component : appState . selectedComponentFilters
34
+ product : productFilters ,
35
+ component : componentFilters
36
36
} ,
37
37
paging : {
38
38
responseSize : appState . pageSize ,
@@ -46,12 +46,12 @@ export function SearchField() {
46
46
47
47
const onClearSearchTerm = ( ) : void => {
48
48
actions . setQueryValue ( '' ) ;
49
- debounceSearch ( '' ) ;
49
+ debounceSearch ( '' , [ ] , [ ] ) ;
50
50
} ;
51
51
52
52
const onChangeSearchTerm = ( _ ?: ChangeEvent < HTMLInputElement > | undefined , newSearchTerm = '' ) : void => {
53
53
actions . setQueryValue ( newSearchTerm ) ;
54
- debounceSearch ( newSearchTerm ) ;
54
+ debounceSearch ( newSearchTerm , appState . selectedProductFilters , appState . selectedComponentFilters ) ;
55
55
} ;
56
56
57
57
return (
You can’t perform that action at this time.
0 commit comments