Show TOC

List and Table EventsLocate this document in the navigation structure

Both sap.m.List and sap.m.Table offer the same events, inheriting them from sap.m.ListBase

The events are:

  • delete
  • selectionChange
  • swipe

All are handled in the same way, in that an event is fired, and the event object that is passed contains listItem data that tells you which items were affected. As with the list, the table has SwipeContent aggregation, and you can set the swipe direction:

           text="press me for action" 

handleAction: function(e) {
   oTable = this.getView().byId("myTable");"Swiped item:", oTable.getSwipedItem());

The SwipeContent is a control that appears on the right hand side of a list item when a swipe gesture is made on the item. We can define handlers for different events that can be triggered:


To test swipe gestures on the desktop, open the Chrome developer tools, and within Settings → Overrides, check the "Emulate touch events" checkbox and reload the page.