18
Views
3
Comments
Solved
[MultiSelect Mobile] Populate list outside of OnInitialize?
Question
multiselect-mobile
Mobile icon
Forge asset by Atul Patel

Hello,

I'm trying to populate the multiselect list after I fetch the data from the database (on the On After Fetch action), and it appears that the data doesn't show up in the list, even though it's in the array.  The demo uses OnInitialize, are we not able to populate the list using anything other than that?

I can confirm the issue in the Demo app...if I change the Load function to execute on On Ready instead of On Initialize, it doesn't work!  Thoughts?

Regards,
Mike

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP
Solution

Hi Mike,

This is easy to fix, what you have to do is put an if condition around the MultiSelect widget on the aggregate that is fetching the data. So for example you have GetEmployees aggregate to select multiple employees in the widget:


No need to do anything in OnInitalize or OnReady.

Regards,

Daniel

2019-04-25 14-57-49
Mike Neyman

Thank you!  I should have thought of that.

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Hi,

What happens is that the change of the value of the .IsDataFetched property will re-render that part of the DOM just after the data is available and not any sooner.

Regards,

Daniel

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.