Hide Load More Button on a ListView

2
Hello friends, Is it possible to hide the load more button on a list view? Sincerely, Omar.
asked
5 answers
6

Hi Omar,

 

This can be done by using CSS to hide this page element, however this does allow the user to hack the CSS and show the button again:

 

.mx-listview-loadMore{

                display:none;
}

If you don't want the user to be able to see more than X items, make sure you restrict the number of objects sent to the client.

answered
6

Hi Omar,

The otherway of doing that is to set Editable to Yes in the General list view settings.

answered
1

Of course you can also simply set the list view page size to something arbitrarily huge. As long as your view never contains more items than the page size, the client won't generate a load more button. 

I would very much recommend this over setting the view to editable. Editability has a (slight) performance impact, will also load all the items, was not created for this purpose at all, and is an accident waiting to happen later down the line once you've forgotten about it and add a text box.  

answered
1

Hello friends,

Thank you all for your suggestions.

I found a solution to hide the loadMore button, I modified the file :  theme/styles/css/lib.css

In this file, you look for the following lines and you put display to none as follows:

.profile-phone .mx-listview-loadMore,
.profile-tablet .mx-listview-loadMore {
Margin: 20px auto;
Width: 95%;
Display: none; }

Next, in the listview properties, set the Page Size value to a very large value.

Best regards,

Omar.

answered
0

Hello,

Thank you for your answers,

I added this CSS code in the style property of my listview, but unfortunately it did not work.

Omar.

answered