simple-table-core 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -49,6 +49,8 @@ The Simple Table component accepts the following props:
|
|
|
49
49
|
- **accessor**: A string used to access the corresponding data in each row.
|
|
50
50
|
- **width**: A number specifying the width of the column.
|
|
51
51
|
- **isEditable**: An optional boolean indicating if the column is editable.
|
|
52
|
+
- **isSortable**: An optional boolean indicating if the column is sortable.
|
|
53
|
+
- **type**: An optional string specifying the data type of the column. Can be "string", "number", "boolean", "date", or "enum".
|
|
52
54
|
- **cellRenderer**: An optional function that takes a row object and returns a `ReactNode` for custom cell rendering.
|
|
53
55
|
|
|
54
56
|
- **columnResizing**: A boolean to enable or disable column resizing. Default is `true`.
|
|
@@ -64,7 +66,12 @@ The Simple Table component accepts the following props:
|
|
|
64
66
|
- **shouldPaginate**: A boolean to enable or disable pagination. Default is `true`.
|
|
65
67
|
- **sortDownIcon**: A React element to display as the sort down icon.
|
|
66
68
|
- **sortUpIcon**: A React element to display as the sort up icon.
|
|
67
|
-
- **onCellChange**: A function that is called when a cell value changes.
|
|
69
|
+
- **onCellChange**: A function that is called when a cell value changes. It receives an object with the following properties:
|
|
70
|
+
- **accessor**: The accessor of the column whose cell value changed.
|
|
71
|
+
- **newValue**: The new value of the cell.
|
|
72
|
+
- **newRowIndex**: The index of the row in the current page.
|
|
73
|
+
- **originalRowIndex**: The original index of the row in the entire dataset.
|
|
74
|
+
- **row**: The entire row object.
|
|
68
75
|
|
|
69
76
|
## Customizable Styles
|
|
70
77
|
|