Hi, I have a scenario like this: I build an Ivy component for user selection(Autocomplete). Then after select a user, parent dialog should receive the selected IUser object. My current solution : Parent dialog :
With this solution, I can get the selected IUser via object userData. Because I think in this case, 2 variables point to the same memory, so parent dialog can get the updated data when it change on child component. But I have a requirement to make it more flexible, do not use object userData. User UserName or IUser for input parameter.Like this
Parent dialog :
But when I try to mapping like my current solution. Parent dialog can not get the selected data from child component. I think because UserName is a string, and it will create a new object when we change it. For IUser, it's an Interface. So if anybody has experience to solve it. Please help me. Thank you and regards. |
Maybe it's a solution for you to work with a callback method? You can get more details about it, in the HtmlDialogDemos project -> Component Callback Demo (Component/ComponentEventListenerDemo.ivp). |
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 22.05.2015 at 10:52
Seen: 4,590 times
Last updated: 28.11.2016 at 11:04