Commit a3d8f86
committed
Track upstream value across renders even when in sync
`useCachedValue`'s during-render reset only updated
`previousValue.current` inside the branch that observes an external
value change. After a debounced save echoed the local edit back as
the new upstream value, the ref stayed pointing at the pre-save
value. The next local edit then made the next render look like an
external change (`previousValue.current !== value` while
`value !== cachedValue`), which fired `onReset` and discarded the
edit.
Restore the post-render effect that unconditionally syncs
`previousValue.current` to the latest committed `value`, so a local
edit following a debounced save reaches `cachedValue` instead of
being reset back.
REDMINE-212611 parent 935ffec commit a3d8f86
2 files changed
Lines changed: 31 additions & 0 deletions
File tree
- entry_types/scrolled/package
- spec/frontend/inlineEditing
- src/frontend/inlineEditing
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
82 | 102 | | |
83 | 103 | | |
84 | 104 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
23 | 34 | | |
24 | 35 | | |
25 | 36 | | |
| |||
0 commit comments