Commit d12e3d4
committed
Merge branch 'bugfix/Optional-TopicList' into develop
When a `TopicListViewComponent` is bound to a topic containing no children, it is removed from the interface, since there's no point in displaying an empty dropdown box. Because of how ASP.NET Core handles data binding of collections, however, this caused all subsequent attributes not to be properly bound in the editor. In the best case scenario, this threw an exception. In the worst case scenario, it would delete the values of all subsequent attributes. (In most cases, it likely threw a required field validation error.)
To mitigate this, this bug fix emits hidden attributes to satisfy the expectations of ASP.NET Core data binding, while maintaining whatever the existing value for the attribute would have been. This allows us to continue to remove empty dropdown boxes from the interface, while also addressing this bug.1 file changed
Lines changed: 10 additions & 6 deletions
Lines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
17 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
0 commit comments