Open mos379 opened 5 years ago
Did you found any solution for this? How did you solved it?
@Bumbar14 I used the PreviousPageModel on the PopUp to update information on the previous model and trigger actions before closing the popup.
OKTapped = new Command(async ok => { var pagemodel = PreviousPageModel as TrackingPageModel; if (pagemodel != null) { //do stuff pagemodel.tracking.ExerciseScores.Add(Tracking); } await CoreMethods.PopPopupPageModel(); });
@mos379, where did you add this code? surely not into the extensions provided by this repo, right?
Here's my fork with an attempt to fix ReverseInit()
https://github.com/tele-bird/FreshMvvm.Popup
Doesn't work... :-(
@tele-bird When I open a popup I do have the PreviousPageModel which is from the calling page. So my workflow is basically that I do any updates from the Popup directly on the preivous model. For example I have a popup for search filters. The actual search is handled in the main view including the SearchParams, so my Popup model has the local search params and on OK tapped I update the search Params on the Main model and trigger a search refresh. Then I Pop the popup :)
Is there a possibility to know on the calling PageModel that the popup is closed and maybe even return data using the standard ReversInit method?