You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry for not labeling this as question, but I can not add labels.
I am having a very bad experience trying to update a text field from a modal popup. The layout is a bit complex, and I am getting a bit lost tracking how children sees the data object. I'll try to specify the layout:
Form
Some property
Array whit children
Single child (columns)
Modal popup
So there are three levels of nested manifest: the main one, the manifest for each column and then another manifest for the modal popup. The modal popup has a button, which bind function perform some stupid calculations, and then stores the result in the data object. The problem is that when the modal closes, the data updated is not reflected on the column (parent). I based the modal in your example of the main website(copy and paste, same _updateMe function), but in it there is no update from any function, just good old object --> fields binding. I don't know if it matters, but I am passing just the whole data object to the modal child manifest.
Also it will be nice if you have time to explain me how the data object is passed to children. It looks like magic for me when I only have to use "text" (for example) as identifier inside a repeated section, and it is magically bind to the correct item inside the list.
Thank you very much.
The text was updated successfully, but these errors were encountered:
resolved when modal closes normally (some control inside triggers event "commit")
rejected when modal is escaped (closed by X button, or Esc, or triggering event "cancel" from inside, or you clicked screen dimmer if any).
Root form does not catch modal close, you must let root know explicitly that it must redraw. It‘s intentional behavior. So in your case, when your modal mutates data object of parent form directly it can be something like this:
$ctrl.modal({/*modal params here*/}).then(function(modalData){// Here goes code for normal close$ctrl.my().root.my("redraw");}).fail(function(){// Here goes code for escaped close$ctrl.my().root.my("redraw");});
If you provided modal with cloned data (that is more suitable in most cases), you must apply data, received from the modal, to a caller form – and then redraw entire caller.
I only have to use "text" (for example) as identifier inside a repeated section, and it is magically bind to the correct item
Did not understand a question. Show the code excerpt, please.
Hello,
Sorry for not labeling this as question, but I can not add labels.
I am having a very bad experience trying to update a text field from a modal popup. The layout is a bit complex, and I am getting a bit lost tracking how children sees the data object. I'll try to specify the layout:
Form
So there are three levels of nested manifest: the main one, the manifest for each column and then another manifest for the modal popup. The modal popup has a button, which bind function perform some stupid calculations, and then stores the result in the data object. The problem is that when the modal closes, the data updated is not reflected on the column (parent). I based the modal in your example of the main website(copy and paste, same _updateMe function), but in it there is no update from any function, just good old object --> fields binding. I don't know if it matters, but I am passing just the whole data object to the modal child manifest.
Also it will be nice if you have time to explain me how the data object is passed to children. It looks like magic for me when I only have to use "text" (for example) as identifier inside a repeated section, and it is magically bind to the correct item inside the list.
Thank you very much.
The text was updated successfully, but these errors were encountered: