Commit a641c08
committed
fix: autocomplete: use state for params, options to work with useMemo
if the objects are passed to useMemo as dependencies directly the
internal equality check fails, which defeats the purpose of useMemo as
it recalculates the client on every render. That then also generates a
new search & debounced search function, which breaks the debouncing.1 parent 63880b9 commit a641c08
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
35 | 40 | | |
36 | 41 | | |
37 | | - | |
| 42 | + | |
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
| |||
0 commit comments