Modify ↓
Ticket #474 (closed defect: fixed)
Collection-control removeChild() doesn't work on current trunk
| Reported by: | sdm | Owned by: | mpo |
|---|---|---|---|
| Priority: | major | Milestone: | 0.4 |
| Component: | modules/kauri-forms | Version: | |
| Keywords: | Cc: |
Description
I've tested the collection-control.html sample page in r1956 and noticed that the delete button doesn't update the wirevalue anymore.
This still worked in r1919.
Both the "delete" and "delete all rows" buttons remove the rows on the screen, but when the form is submitted, the wirevalue still contains the removed rows.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
In commit r1927 a value-cache was added to container-controls.
It seems to me that this value-cache should also be updated when AbstractContainerControl?.removeChild is called:
so this:
AbstractContainerControl.prototype.removeChild = function(childId) { this.getChild(childId).close(); delete this.getChildren()[childId]; };should be:
AbstractContainerControl.prototype.removeChild = function(childId) { this.getChild(childId).close(); delete this.getChildren()[childId]; this.updateValue(true, true); // be sure to handle change in value structure };