API Docs for: 1.0.0

eZ.LoadMorePagination Class

View extension providing a pagination based on a load more button. A Load More Pagination view can render and append an item view per new item added in the items attribute. The view output should provide an element with the class ez-loadmorepagination-more, when the user taps on its element, the offset attribute is incremented by limit value. The view is free to handle that event in its own way but this extension is primarily design to be used with the eZ.AsynchronousView extension. It also handles a loading state which result in the is-page-loading class to be added/removed from the view container. The extension also expects the rendered view to have the following elements:

  • an element with the class ez-loadmorepagination-content where the item view containers are added
  • an element with the class ez-loadmorepagination-more-count where the remaing number of element to load is displayed
  • an element with the class ez-loadmorepagination-display-count where the number of currently displayed element is shown.

When a View is extended with this extension, it should define the following properties:

  • _getExpectedItemsCount a function that should return the number of expected items in total
  • _ItemViews a constructor function to build the View items
  • _itemViewBaseConfig the base configuration to pass the item views. This object will be merged with the item object and will be passed to the item view.



  • newItems
deprecated protected

Appends a rendered item view for the last loaded items.


  • newItems Array


() Number protected

Counts the number of loaded and displayed items.



() private

Destroys the item views


() protected

Disables the load more button


() protected

Enables the load more button


  • struct
Object private

Returns the item view configuration for the given struct. It mixes the view configuration, the base item view configuration and the struct.


  • struct Object




() Y.Node protected

Returns the load more button




  • itemNewVal
  • itemPrevVal

Return an array containing the items that we want to append in the view.


  • itemNewVal Array

    an array containing the new items.

  • itemPrevVal Array

    an array containing the old items.


() protected

tap event handler on the load more button.


() protected

Removes the loading state of the UI


() protected

Sets the UI in the loading the state


() protected

Updates the pagination displayed to the editor.


() protected

Updates the display count with the number of currently loaded subitems.


() protected

Updates the more count in the load more button.



Function protected

Holds a function returning the number of items the view is supposed to display


Array deprecated protected

Holds the grid item view instances for the current grid. This property is deprecated and will be removed in PlatformUI 2.0, please use this._itemViews instead.


Function protected

Holds the View constructor to use to render each item.


Object protected

Holds the base configuration object for the item view. This object will be merged with the item object and the resulting object is used as the configuraton for the item view instance.


Array protected

Holds the item view instances




The items to display



The max number of the Locations to display per 'show more' session

Default: 10


Boolean readonly

Indicates the whether the subitem list is currently in loading.



The offset in the Location list. A value below zero means no loading has been made yet.

Default: minus the limit