Commit 5183ee3
fix(components): ArchbaseTimeRangeSelector não reseta ao re-render do pai
O useEffect que sincroniza defaultRangeValue resetava o selectedRange
em cada re-render do pai, causando loop: usuário seleciona 7d →
pai re-renderiza → useEffect reseta para 1d → onRangeChange dispara.
Agora usa ref para ignorar primeira execução e comparar se o valor
realmente mudou antes de atualizar o state interno.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 8461468 commit 5183ee3
File tree
1 file changed
+14
-7
lines changed- packages/components/src/editors
1 file changed
+14
-7
lines changedLines changed: 14 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
178 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
179 | 192 | | |
180 | | - | |
181 | 193 | | |
182 | 194 | | |
183 | | - | |
184 | 195 | | |
185 | 196 | | |
186 | 197 | | |
187 | 198 | | |
188 | 199 | | |
189 | 200 | | |
190 | 201 | | |
191 | | - | |
192 | 202 | | |
193 | 203 | | |
194 | | - | |
195 | 204 | | |
196 | 205 | | |
197 | 206 | | |
198 | 207 | | |
199 | | - | |
200 | | - | |
201 | 208 | | |
202 | 209 | | |
203 | 210 | | |
| |||
0 commit comments