You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
columns | *Array\[string\|ColumnSettings\]* (optional) | Table columns, if not defined `rows` JSON data is used. See [column settings](#column-settings).
55
-
excludeColumns | *Array\[string\]* (optional) | Exclude columns by key, allows to quickly exclude elements from `rows` JSON data without defining all `columns`. See [exclude columns](#exclude-columns)
56
-
className | *string* (optional)| Class to use for `<table>` element.
57
-
theadClassName | *string* (optional)| Class to use for `<thead>` element.
58
-
caption | *string* (optional)| Table `<caption>` element contents. If not defined `<caption>` element will not be rendered.
59
-
settings | *TableSettings* (optional)| Table settings, see [table settings](#table-settings).
60
-
onClickCell | *Function* (optional)| Callback triggered when a cell is clicked: `fn(event, columnName, rowData)`.
61
-
onClickRow | *Function* (optional)| Callback triggered when a row is clicked: `fn(event, rowData)`.
62
-
onClickHeader | *Function* (optional)| Callback triggered when a column header is clicked: `fn(event, columnName)`.
|columns |*Array\[string\|ColumnSettings\]* (optional) | Table columns, if not defined `rows` JSON data is used. See [column settings](#column-settings).|
55
+
|excludeColumns |*Array\[string\]* (optional) | Exclude columns by key, allows to quickly exclude elements from `rows` JSON data without defining all `columns`. See [exclude columns](#exclude-columns)|
56
+
|className |*string* (optional)| Class to use for `<table>` element.|
57
+
|theadClassName |*string* (optional)| Class to use for `<thead>` element.|
58
+
|caption |*string* (optional)| Table `<caption>` element contents. If not defined `<caption>` element will not be rendered.|
59
+
|settings |*TableSettings* (optional)| Table settings, see [table settings](#table-settings).|
60
+
|onClickCell |*Function* (optional)| Callback triggered when a cell is clicked: `fn(event, columnName, rowData)`.|
61
+
|onClickRow |*Function* (optional)| Callback triggered when a row is clicked: `fn(event, rowData)`.|
62
+
|onClickHeader |*Function* (optional)| Callback triggered when a column header is clicked: `fn(event, columnName)`.|
63
63
64
64
### Table settings
65
65
66
-
Setting name | Type | Description
67
-
---|---|---
68
-
header | *boolean* (optional) | Determines whether to show table header. Default is `true`.
69
-
classPrefix | *string* (optional) | JsonTable uses `class` attributes for its markup like `jsonRow` or `jsonCell`. The default prefix is `json` but you can use this setting to change it in the case it is conflicting with other classes in your app.
70
-
noRowsMessage | *string*\|*ReactComponent* (optional) | Message shown when the table has no rows. Default is *"No items"*.
71
-
cellClass | *Function* (optional) | Cell custom class using `fn(currentClass, columnKey, rowData)`.
72
-
headerClass | *Function* (optional) | Header custom class using `fn(currentClass, columnKey)`.
73
-
rowClass | *Function* (optional) | Row custom class using `fn(currentClass, rowData)`.
74
-
cellRenderer | *Function* (optional) | If provided, this function will be used to render all the cells' content. If not provided, the cell contents will be `item[field]`, the value of the item for that field.
|header |*boolean* (optional) | Determines whether to show table header. Default is `true`.|
69
+
|classPrefix |*string* (optional) | JsonTable uses `class` attributes for its markup like `jsonRow` or `jsonCell`. The default prefix is `json` but you can use this setting to change it in the case it is conflicting with other classes in your app.|
70
+
|noRowsMessage |*string*\|*ReactComponent* (optional) | Message shown when the table has no rows. Default is *"No items"*.|
71
+
|cellClass |*Function* (optional) | Cell custom class using `fn(currentClass, columnKey, rowData)`.|
72
+
|headerClass |*Function* (optional) | Header custom class using `fn(currentClass, columnKey)`.|
73
+
|rowClass |*Function* (optional) | Row custom class using `fn(currentClass, rowData)`.|
74
+
|cellRenderer |*Function* (optional) | If provided, this function will be used to render all the cells' content. If not provided, the cell contents will be `item[field]`, the value of the item for that field.|
75
75
76
76
### Column settings
77
77
78
-
Setting name | Type | Description
79
-
---|---|---
80
-
key | string | Object key of `rows` JSON data.
81
-
label | *string* (optional) | Column header, if not defined `key` is used.
82
-
cell | *Function*\|*string* (optional) | Contents of table cell, if not defined `key` is used. Can be `string` or `function(row, columnKey)`
83
-
group | *string* (optional) | Allows to group multiple items under same group header. See [column grouping](#column-grouping)
0 commit comments