7
Views
2
Comments
Solved
LineCount on React Widget List
Question

I am new at outsystems and I'm trying to have list that shows only one record but has the option show more on click.

Since I don't have linecount on the list as the tradicional has, how can I show only one on screen.

Basically I have the comments of products, these comments must show only one but the list must have the Show More option that allows to see the entire list.

Myapp.oml

Rank: #70
Solution

Hi Marco,


Adding to what Kilian mentioned, Lists (Table Records don't) have the OnScrollEnding possibility out of the box:



You can take advantage of the algorithm which is ready to use. To use it on a Load More button instead of the Scroll Ending, you would need then to remove the OnScrollEnding event and add a Load More button linked to the automatic OnScrollEnding action generated.


Regards,
João

Myapp1.oml

mvp_badge
MVP
Rank: #2

Hi Marco,

You need to limit the number of records in the Aggregate by setting the Max. Records to 1 initially, then set it to a greater value when you press the "show more" button. You already have the MaxRecords variable, just change the value and if needed refresh the Aggregate (I'm not quite sure whether it's needed).

Rank: #70
Solution

Hi Marco,


Adding to what Kilian mentioned, Lists (Table Records don't) have the OnScrollEnding possibility out of the box:



You can take advantage of the algorithm which is ready to use. To use it on a Load More button instead of the Scroll Ending, you would need then to remove the OnScrollEnding event and add a Load More button linked to the automatic OnScrollEnding action generated.


Regards,
João

Myapp1.oml