Modify

Ticket #474 (closed defect: fixed)

Opened 8 months ago

Last modified 7 months ago

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

comment:1 Changed 7 months ago by sdm

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
};

comment:2 Changed 7 months ago by sdm

  • Status changed from new to closed
  • Resolution set to fixed

In [1957]:

AbstractContainerControl?.removeChild now updates the value-cache. This fixes #474

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.