Commit b182d89
committed
Add model watch to City Autocomplete
We display multiple city fields on our donation form, one for
each address type. These fields each have their own
internal state for holding their value, and they emit events
to update the model. When the model was changed by one
city field it wasn't being picked up by the others meaning
if a donor changed their address type after selecting a
city the other city field would be blank.
This adds a watcher for changes in the model value and
updates the internal state when it changes.
Ticket: https://phabricator.wikimedia.org/T3976351 parent c098a53 commit b182d89
File tree
2 files changed
+14
-0
lines changed2 files changed
+14
-0
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
184 | 188 | | |
185 | 189 | | |
186 | 190 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
264 | 274 | | |
0 commit comments