SalesForce < lightning:datatable >属性

SalesForce中< lightning:datatable >标签属性值

Attributes
body: component[] The body of the component. In markup, this is everything in the body of the tag.
class: string A CSS class for the outer element, in addition to the component’s base classes.
columns: list Array of the columns object that’s used to define the data types. Required properties include ‘label’, ‘dataKey’, and ‘type’. The default type is ‘text’.
data: object The array of data to be displayed.
defaultSortDirection: string Specifies the default sorting direction on an unsorted column. Valid options include ‘asc’ and ‘desc’. The default is ‘asc’ for sorting in ascending order.
draftValues: object The current values per row that are provided during inline edit.
enableInfiniteLoading: boolean Enables or disables infinite loading. The default is false.
errors: object Specifies an object containing information about cell level, row level, and table level errors. When it’s set, error messages are displayed on the table accordingly.
hideCheckboxColumn: boolean Hides or displays the checkbox column for row selection. To hide the checkbox column, set hideCheckboxColumn to true. The default is false.
hideTableHeader: boolean Specifies whether the table header should be hidden.
isLoading: boolean Specifies whether more data is being loaded and displays a spinner if so. The default is false.
keyField: string Required for better performance. Associates each row with a unique ID.
loadMoreOffset: integer Determines when to trigger infinite loading based on how many pixels the table’s scroll position is from the bottom of the table. The default is 20.
maxColumnWidth: integer The maximum width for all columns. The default is 1000px.
maxRowSelection: integer The maximum number of rows that can be selected. Checkboxes are used for selection by default, and radio buttons are used when maxRowSelection is 1.
minColumnWidth: integer The minimum width for all columns. The default is 50px.
oncancel: action The action triggered when you click the Cancel button during inline edit. All edited cells revert to their original values.
oncellchange: action The action triggered when a cell’s value changes after an inline edit. Returns the draftValues object.
onheaderaction: action The action triggered when a header action is clicked. By default, it also closes the header actions menu. Returns the action and columnDefinition objects.
onloadmore: action The action triggered when infinite loading loads more data.
onresize: action The action triggered when the table renders columns the first time, and whenever a column is resized. Returns columnWidths and isUserTriggered.
onrowaction: action The action triggered when a row action is clicked. By default, it also closes the row actions menu. Returns the eventDetails object.
onrowselection: action The action triggered when a row is selected. Returns the selectedRows object.
onsave: action The action triggered when you click the Save button during inline edit. Returns the draftValues object.
onsort: action The action triggered when a column is sorted. Returns fieldName and sortDirection.
resizeColumnDisabled: boolean Specifies whether column resizing is disabled. The default is false.
resizeStep: integer The width to resize the column when user press left or right arrow. The default is 10px.
rowNumberOffset: integer Determines where to start counting the row number. The default is 0.
selectedRows: list Enables programmatic row selection with a list of keyField values.
showRowNumberColumn: boolean Shows or hides the row number column. Set to true to show the row number column. The default is false.
sortedBy: string The column fieldName that controls the sorting order. Sort the data using the onsort event handler.
sortedDirection: string Specifies the sorting direction. Sort the data using the onsort event handler. Valid options include ‘asc’ and ‘desc’.
suppressBottomBar: boolean Specifies whether the inline edit Save/Cancel bottom bar should be hidden.
title: string Displays tooltip text when the mouse moves over the element.
wrapTextMaxLines: integer This value specifies the number of lines after which the content will be cut off and hidden. It must be at least 1 or more. The text in the last line is truncated and shown with an ellipsis.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值