docs

Lists

Lists have properties and events and they contain list items that inherit from sap.m.ListItemBase, which provides navigation, selection and event features. The list item type determines the way the list item interacts by providing additional features.


List Properties

Lists can have the following properties:


Swipe For Action

A user can swipe left on a list item to bring in a control, such as a button, and initiate an action for this item. This control is defined through the swipeContent aggregation of the list and is displayed to the right or center of the list item. For more information, see Swipe List for Action.


List Events

Events are available for selecting, deleting and swiping in lists. The selection mode fires a select event and the deletion mode a delete event. A swipe left fires a swipe event. These events contain information about the list item that caused the event.


Rerendering

A list is rerendered together with all of its list items when the data of a bound model is changed. Due to the limited hardware resources of mobile devices, this may cause delays for lists that contain many list items. For this reason, we do not recommend using a list for these use cases.


List Items

All list items inherit from ListItemBase, which contains the features for navigation, selection, and event.

Five different types of list items are available, which determine the way a list item interacts. A list item has a content area (main area), which may fire a press event, and a navigation area on the right hand side, which may fire a press or a detailPress event. The type property for each list item defines the events that are fired. You need to define a type to decide which visual feedback if given by a list item after it has been touched. The five available types are as follows:

Except for ActionListItem, list items do not by default fire an event unless it is configured with a type that defines how events are fired. The following table shows the different combinations of list item types and events:

Type Press Event detailPress Event Icon Active Feedback
**Inactive \(default\)** \-- \-- \-- \--
**Active** yes \-- \-- yes
**Navigation** yes \-- \> yes
**Detail** \-- yes \(\>\) \--
**DetailAndActive** yes yes \(\>\) yes \(content only\)

As mentioned above, ListItemBase has an unread indicator property, which shows a blue bubble. This has to be enabled by the lists showUnread property. For selections on each list item a selected property (default: false) exists. Another feature is the counter property (default: null), which shows integer numbers except zero. If the number is zero, the counter is hidden. Properties for ListItemBase:

The following events are available for ListItemBase:


List Item Types

The following types are available for list items:


API Reference