pfListView
patternfly.views
Component for rendering a list view.
Pass a customScope object containing any scope variables/functions you need to access from the transcluded source, access these
via '$ctrl.customScope' in your transcluded hmtl.
If using expanding rows, use a list-expanded-content element containing expandable content for each row. Item data can be accessed inside list-expanded-content by using $parent.item.property. For each item in the items array, the expansion can be disabled by setting disableRowExpansion to true on the item.
Setting compoundExpanion requires the applicatiot to set/unset the items' isExpanded field and to handle the contents in the list-expanded-content element based on what is expanded.
<pf-list-view
items="{array}"
config="{object}"
page-config="{object}"
action-buttons="{array}"
enable-button-for-item-fn="{function (action, item))}"
menu-actions="{array}"
hide-menu-for-item-fn="{function (item))}"
menu-class-for-item-fn="{function (item))}"
update-menu-action-for-item-fn="{function (action, item))}"
custom-scope="{object}"
empty-state-config="{object}"
empty-state-action-buttons="{array}">
</pf-list-view>
| Param | Type | Details |
|---|---|---|
| items | array | Array of items to display in the list view. If an item in the array has a 'rowClass' field, the value of this field will be used as a class specified on the row (list-group-item). |
| config | object | Configuration settings for the list view:
|
| pageConfig | object | Optional pagination configuration object. Since all properties are optional it is ok to specify: 'pageConfig = {}' to indicate that you want to use pagination with the default parameters.
|
| actionButtons | array | List of action buttons in each row
|
| enableButtonForItemFn | function (action, item) | function(action, item) Used to enabled/disable an action button based on the current item |
| menuActions | array | List of actions for dropdown menu in each row
|
| hideMenuForItemFn | function (item) | function(item) Used to hide all menu actions for a particular item |
| menuClassForItemFn | function (item) | function(item) Used to specify a class for an item's dropdown kebab |
| updateMenuActionForItemFn | function (action, item) | function(action, item) Used to update a menu action based on the current item |
| customScope | object | Object containing any variables/functions used by the transcluded html, access via $ctrl.customScope. |
| emptyStateConfig | object | Optional configuration settings for the empty state component. See the Empty State component |
| emptyStateActionButtons | array | Optional buttons to display under the icon, title, and informational paragraph in the empty state component. See the Empty State component |