31
Views
3
Comments
Slow loading on the detail page
Question

Good afternoon. 

I have a detail page "MeetingDetail". That when it gets an Id it shows the details of that Id and if it has no Id, it shows me a form.

What is happening to me is that it is rendering slowly, when I click on a link that already has its Id and redirects me to this page "MeetingDetail", for a few thousands of minutes or sometimes a second or two, for a moment I get the form and when it takes to load, I get the detail page.

How can I make it so that the page does not load until the detail page with its id has loaded. I don't know if I'm explaining myself well.

Should I put some condition or JS in the OnInitialize or OnRender?

Thank you very much! :)

You can make a variable in the Screen called 'IsLoading' (boolean)
Put the default value as "True"
Then, you can create a 'OnAfterFetch' client action on your data action. 
In this action you can put the value of the IsLoading variable to 'False'

In the visibility property of your container holding the form, use the IsLoading variable.
You can also add a loading icon that holds 'Not IsLoading' as its visibility variable.

I hope this helps

Alternative with less moving parts is to use the IsDataFetched of your Aggregate or DataAction as a condition for showing certain parts of the screen.

Dorine

Hi,

As Dorine suggested,

Enclose your Form with an If widget and add a condition for eg: GetMeetingDetailsById.List.IsDataFetched. Your form should be on True branch of the If and in the False part, Add a spinner widget to intimate the user that the data is being loaded. Hope this helps. 

Regards,

Shree

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