Commit 7aca759
authored
feat(server): reset scheduleSearch only after all components mount (#6650)
* wip: reset search scheduler based on callback
* less api
* better description
* comment
* chore
* test correctly, we are server rendering
because we're in ssr, there's no notion of eg useEffect and we also don't search twice1 parent 2641a67 commit 7aca759
File tree
5 files changed
+57
-35
lines changed- packages
- instantsearch.js
- src/lib
- test
- react-instantsearch-core/src
- components
- lib
- react-instantsearch-nextjs/src/__tests__
5 files changed
+57
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
| 233 | + | |
232 | 234 | | |
233 | 235 | | |
234 | 236 | | |
| |||
700 | 702 | | |
701 | 703 | | |
702 | 704 | | |
703 | | - | |
704 | | - | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | | - | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
711 | 724 | | |
712 | 725 | | |
713 | 726 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
Lines changed: 22 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
111 | 115 | | |
112 | 116 | | |
113 | 117 | | |
| |||
Lines changed: 9 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| |||
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
73 | | - | |
74 | 75 | | |
75 | | - | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | 82 | | |
87 | 83 | | |
88 | 84 | | |
| |||
95 | 91 | | |
96 | 92 | | |
97 | 93 | | |
98 | | - | |
| 94 | + | |
99 | 95 | | |
100 | 96 | | |
101 | 97 | | |
| |||
105 | 101 | | |
106 | 102 | | |
107 | 103 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | 104 | | |
113 | 105 | | |
114 | 106 | | |
| |||
117 | 109 | | |
118 | 110 | | |
119 | 111 | | |
120 | | - | |
| 112 | + | |
121 | 113 | | |
122 | 114 | | |
123 | 115 | | |
| |||
126 | 118 | | |
127 | 119 | | |
128 | 120 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | 121 | | |
134 | 122 | | |
135 | 123 | | |
| |||
141 | 129 | | |
142 | 130 | | |
143 | 131 | | |
144 | | - | |
| 132 | + | |
145 | 133 | | |
146 | 134 | | |
147 | 135 | | |
| |||
150 | 138 | | |
151 | 139 | | |
152 | 140 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | 141 | | |
158 | 142 | | |
159 | 143 | | |
| |||
0 commit comments