Commit cc397da
Lee Richmond
Avoid syncing dirty props on store update
This is probably a better default, following principle of least
surprise, unless we hear otherwise. If you load instanceA, and 1m later
load instanceB with new data from the server, instanceA will change. But
if instanceA has already updated the relevant attribute (it is dirty),
avoid making that change.
Relatedly, if instanceA syncs with a new store update, it would see that
property as dirty, as it didn't match the attributes it was instantiated
with. This commit also ensures synced properties are not seen as dirty.1 parent 829ee0c commit cc397da
3 files changed
+68
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
| 442 | + | |
442 | 443 | | |
443 | 444 | | |
444 | | - | |
| 445 | + | |
| 446 | + | |
445 | 447 | | |
446 | 448 | | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
447 | 452 | | |
448 | 453 | | |
449 | 454 | | |
| 455 | + | |
450 | 456 | | |
451 | 457 | | |
452 | 458 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
9 | 19 | | |
10 | 20 | | |
11 | 21 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | | - | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
64 | | - | |
| 65 | + | |
65 | 66 | | |
66 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
67 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
68 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
69 | 93 | | |
70 | 94 | | |
71 | | - | |
72 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
73 | 98 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
78 | 104 | | |
79 | | - | |
80 | | - | |
81 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
82 | 109 | | |
| 110 | + | |
83 | 111 | | |
84 | 112 | | |
85 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
86 | 121 | | |
87 | 122 | | |
88 | | - | |
| 123 | + | |
89 | 124 | | |
90 | 125 | | |
91 | 126 | | |
92 | 127 | | |
93 | 128 | | |
| 129 | + | |
94 | 130 | | |
95 | 131 | | |
96 | 132 | | |
| |||
0 commit comments