Commit 4fc7f90
authored
fix(tags): persist tag selections in the case and session editors (#456)
Adding a tag in the case or session editor created the Tag but never linked it,
and selecting an existing tag while also creating one was lost too. Creating a
tag invalidates the parent queries (the case/session rows include their tags),
which refetches the case/session; a reset/re-sync effect then reverted the
user's in-progress tag selection to the saved tags before the form submitted, so
the new (or selected) tags were dropped. The run editor was unaffected because it
keeps tags in plain component state with no such re-sync.
- Case editor: the defaults-restore effect now preserves the current tags value
(currentValues.tags) on re-run, matching how issues were already preserved.
- Session editor: selectedTags is initialized from the loaded session once
(guarded by a ref) instead of re-syncing on every sessionData change.1 parent 18e497a commit 4fc7f90
2 files changed
Lines changed: 13 additions & 4 deletions
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
914 | 914 | | |
915 | 915 | | |
916 | 916 | | |
917 | | - | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
918 | 922 | | |
919 | 923 | | |
920 | 924 | | |
| |||
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
804 | 804 | | |
805 | 805 | | |
806 | 806 | | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
807 | 811 | | |
808 | 812 | | |
809 | 813 | | |
| |||
1251 | 1255 | | |
1252 | 1256 | | |
1253 | 1257 | | |
1254 | | - | |
1255 | 1258 | | |
1256 | 1259 | | |
1257 | 1260 | | |
| |||
1402 | 1405 | | |
1403 | 1406 | | |
1404 | 1407 | | |
1405 | | - | |
| 1408 | + | |
| 1409 | + | |
1406 | 1410 | | |
1407 | | - | |
| 1411 | + | |
1408 | 1412 | | |
| 1413 | + | |
1409 | 1414 | | |
1410 | 1415 | | |
1411 | 1416 | | |
| |||
0 commit comments