Commit ea44d05
authored
fix: Preserve default select when saving search (#1986)
## Summary
This PR fixes a bug which caused searches with the defaultSelectExpression to be saved with an empty `select` value, resulting in no select value appearing when loading the saved search.
The fix is to save the default select expression when there is no select value in the `searchedConfig` value (from the URL params), which corresponds to the case in which the default select expression is shown on the (non-saved) search page.
### Screenshots or video
Before:
https://github.com/user-attachments/assets/2b578dab-2085-4e64-a79c-c2e6e8f085fa
After:
https://github.com/user-attachments/assets/bf713b86-a454-4fc8-9ed7-5370e2e665e0
### How to test locally or on Vercel
You can reproduce the behavior in the preview environment following the video demo above.
### References
- Linear Issue: Closes HDX-3298
- Related PRs:1 parent 73da48a commit ea44d05
3 files changed
Lines changed: 57 additions & 3 deletions
File tree
- .changeset
- packages/app
- src
- tests/e2e/features/search
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
346 | 345 | | |
347 | 346 | | |
348 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
349 | 355 | | |
350 | 356 | | |
351 | 357 | | |
| |||
359 | 365 | | |
360 | 366 | | |
361 | 367 | | |
362 | | - | |
| 368 | + | |
363 | 369 | | |
364 | 370 | | |
365 | 371 | | |
| |||
378 | 384 | | |
379 | 385 | | |
380 | 386 | | |
381 | | - | |
| 387 | + | |
382 | 388 | | |
383 | 389 | | |
384 | 390 | | |
| |||
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
306 | 349 | | |
307 | 350 | | |
308 | 351 | | |
| |||
0 commit comments