Mobile?,???????OnAfterFetch???,??????OnChange??

Mobile?,???????OnAfterFetch???,??????OnChange??,?????????????,??????!

Hello Con Liu, 

Japanese/Chinese characters don't appear correctly here, at least for me. 

Would be possible to make your question in English? 

Cheers. 

I'm sorry! I didn't know the platform didn't support Chinese.                                                                                          My problem is that on the Mobile side, when I load the page, the program executes the "OnChange" event after executing the "OnAfterFetch" event, and it executes the "OnChange" event twice.



There is no problem, Con Liu, 

In any case, most people here also do not read Chinese ??

I can't identify in your images, what is the element that is triggering the OnChange twice? 

Also, what's your code on the OnAfterFetch? 

Cheers

Ok, I think I understood...

You're doing some sort of pagination, right?
Are you using the Pagination widget from OutSystemsUI? 


 thanks, I have use sort widget to make sort of data and use dropdownlist widget to set paging data

Ok, I think I understood...

You're doing some sort of pagination, right?
Are you using the Pagination widget from OutSystemsUI? 




Solution

Right.

The problem here seems to be the OnAfterFetch.

You shouldn't set anything related to the sort/pagination on it, or you will have this type of problems due to the nature of React apps (like in Mobile): any change to an element (Variable, List, etc) used on the screen will immediately change the UI element.

First thing, you should not set anything related to your filters/sort/pagination on the OnAfterFetch, to avoid this type of "feedback" causing multiple triggerings of your OnChange... I am imagining that depending on what you do (like changing sort, or filter, you need reset the pagination. Do this on the OnChange, not on the OnAfterFetch.

This may help solve this issue.

Solution

Thank you very much!                                                                                                                                                               You're right ! I removed the sort widget, and the problem was resolved.

Right.

The problem here seems to be the OnAfterFetch.

You shouldn't set anything related to the sort/pagination on it, or you will have this type of problems due to the nature of React apps (like in Mobile): any change to an element (Variable, List, etc) used on the screen will immediately change the UI element.

First thing, you should not set anything related to your filters/sort/pagination on the OnAfterFetch, to avoid this type of "feedback" causing multiple triggerings of your OnChange... I am imagining that depending on what you do (like changing sort, or filter, you need reset the pagination. Do this on the OnChange, not on the OnAfterFetch.

This may help solve this issue.