Improve this doc View source

pfDataList
directive in module patternfly.views

Description

Directive for rendering a data list.

Usage

as attribute
<ANY pf-data-list
     items="{array}"
     config="{object}"
     actions="{array}"
     update-action-for-item-fn="{function (action, item))}">
   ...
</ANY>

Parameters

ParamTypeDetails
itemsarray

Array of items to display in the list

configobject

Configuration settings for the data list:

  • .showSelectBox - (boolean) Show item selection boxes for each item, default is true
  • .selectItems - (boolean) Allow row selection, default is false
  • .dlbClick - (boolean) Handle double clicking (item remains selected on a double click). Default is false.
  • .multiSelect - (boolean) Allow multiple row selections, selectItems must also be set, not applicable when dblClick is true. Default is false
  • .selectionMatchProp - (string) Property of the items to use for determining matching, default is 'uuid'
  • .selectedItems - (array) Current set of selected items
  • .checkDisabled - ( function(item) ) Function to call to determine if an item is disabled, default is none
  • .rowHeight - (int) ONLY used to determine check box placement. Default is 36
  • .onCheckBoxChange - ( function(item) ) Called to notify when a checkbox selection changes, default is none
  • .onSelect - ( function(item, event) ) Called to notify of item selection, default is none
  • .onSelectionChange - ( function(items) ) Called to notify when item selections change, default is none
  • .onClick - ( function(item, event) ) Called to notify when an item is clicked, default is none
  • .onDblClick - ( function(item, event) ) Called to notify when an item is double clicked, default is none
actionsarray

List of actions for dropdown menu in each row

  • .name - (String) The name of the action, displayed on the button
  • .title - (String) Optional title, used for the tooltip
  • .actionFn - (function(action)) Function to invoke when the action selected
  • .isVisible - (Boolean) set to true to disable the action
  • .isDisabled - (Boolean) set to true to disable the action
  • .isSeparator - (Boolean) set to true if this is a placeholder for a separator rather than an action
updateActionForItemFnfunction (action, item)

function(action, item) Used to update an action based on the current item

Example

Source





Demo