Commit 6715a03
committed
feature #254 [Live] Re-extracting form data after submit (weaverryan)
This PR was squashed before being merged into the 2.x branch.
Discussion
----------
[Live] Re-extracting form data after submit
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes
| Tickets | Addresses part of #221
| License | MIT
This fixes 3 bugs at once:
1) This recalculates `formValues` after submit, in case the submitted data *changes* the form's data or underlying structure (e.g. `CollectionType`)
2) If a field is suddenly missing entirely from a form (hint: think removing an embedded CollectionType form), then previously `validatedFields` did not "forget" that field. This caused edge-case bug when removing an embedded form that was validated, then adding a new form a moment later (which would be empty, but now validated).
3) When passing a `FormView` into your component that was already validated, on the first re-render, the validation would be lost and only modified fields would be validated.
Ping `@Lustmored` and `@norkunas`. This mostly addresses `@norkunas`'s problems with how `getFormValues()` works, but this was also causing trouble for `@Lustmored`, potentially for different reasons. So, this may not solve the problems addressed in #221, but it's certainly related.
Cheers!
Commits
-------
c8b3a28 [Live] Re-extracting form data after submitFile tree
14 files changed
+729
-63
lines changed- src/LiveComponent
- src
- Resources/doc
- Util
- tests
- Fixture
- Component
- Dto
- Form
- templates/components
- Functional/Form
- Unit/Util
14 files changed
+729
-63
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
8 | 13 | | |
9 | 14 | | |
10 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 68 | + | |
| 69 | + | |
73 | 70 | | |
74 | | - | |
75 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
76 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
77 | 91 | | |
78 | 92 | | |
79 | 93 | | |
| |||
87 | 101 | | |
88 | 102 | | |
89 | 103 | | |
90 | | - | |
| 104 | + | |
91 | 105 | | |
92 | 106 | | |
93 | 107 | | |
| |||
103 | 117 | | |
104 | 118 | | |
105 | 119 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
| |||
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
127 | | - | |
| 129 | + | |
128 | 130 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
| 131 | + | |
134 | 132 | | |
135 | 133 | | |
136 | 134 | | |
137 | 135 | | |
138 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
| |||
146 | 149 | | |
147 | 150 | | |
148 | 151 | | |
149 | | - | |
| 152 | + | |
150 | 153 | | |
151 | 154 | | |
152 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
153 | 165 | | |
154 | 166 | | |
155 | 167 | | |
| |||
192 | 204 | | |
193 | 205 | | |
194 | 206 | | |
195 | | - | |
| 207 | + | |
196 | 208 | | |
197 | 209 | | |
198 | 210 | | |
| |||
0 commit comments