@heliux-org/design-system-core 0.0.294-TableTestBuildV2 → 0.0.294
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/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@heliux-org/design-system-core",
|
3
|
-
"version": "0.0.294
|
3
|
+
"version": "0.0.294",
|
4
4
|
"description": "Official Heliux design system resources for application development in React.js",
|
5
5
|
"main": "./dist/main.js",
|
6
6
|
"types": "./dist/types/index.d.ts",
|
@@ -298,5 +298,5 @@
|
|
298
298
|
"PR: Icon 💎": "New Icons"
|
299
299
|
}
|
300
300
|
},
|
301
|
-
"gitHead": "
|
301
|
+
"gitHead": "5341ddbfbf52e32ef2e55c52228e03b1569138b5"
|
302
302
|
}
|
@@ -65,18 +65,29 @@ To enable sorting functionality for your table columns, you can use the `enableS
|
|
65
65
|
|
66
66
|
## Selectable Rows
|
67
67
|
|
68
|
+
`hasSelectableRows` This prop is used for making mutiple rows to be selectable. When enabled, it ensures that mutiple rows can be selected at a time.
|
69
|
+
|
70
|
+
`onRowSelectionChange` This prop is used to handle row selections. It triggers a callback when rows are selected, passing the selected rows data so you can perform actions like displaying details or updating the state.
|
71
|
+
|
68
72
|
<Canvas>
|
69
73
|
<Story of={NewTableStories.SelectableRows} />
|
70
74
|
</Canvas>
|
71
75
|
|
72
76
|
## Pre Selected Rows
|
73
77
|
|
78
|
+
The `initiallySelectedRowIds` prop is used to preselect the table rows. Its type is `Array of ids`, meaning it will accept an array of ids of the rows you want to pre select when table is rendered.
|
79
|
+
|
74
80
|
<Canvas>
|
75
81
|
<Story of={NewTableStories.PreSelectedRows} />
|
76
82
|
</Canvas>
|
77
83
|
|
78
84
|
## Expandable Content
|
79
85
|
|
86
|
+
This example demonstrates how to enable expandable rows in the `NewTable` component using the `isExpandable` and `renderExpandedContent` props.
|
87
|
+
|
88
|
+
- **`isExpandable` (type: `boolean`)**: This prop enables rows in the table to be expandable. When set to `true`, rows can be expanded to display additional content.
|
89
|
+
- **`renderExpandedContent` (type: `(row: any) => React.ReactNode`)**: This prop defines the additional content to be displayed when a row is expanded. It accepts a function that returns a React node, allowing custom content for each row.
|
90
|
+
|
80
91
|
<Canvas>
|
81
92
|
<Story of={NewTableStories.ExpandableContent} />
|
82
93
|
</Canvas>
|
@@ -101,24 +112,32 @@ To enable sorting functionality for your table columns, you can use the `enableS
|
|
101
112
|
|
102
113
|
## Horizontal Scroll
|
103
114
|
|
115
|
+
The `size` prop is passed in the column object to set the custom size for that column. Its type is `number`. When the columns width accumulatively increases more than the view width the table becomes horizontally scrollable.
|
116
|
+
|
104
117
|
<Canvas>
|
105
118
|
<Story of={NewTableStories.HorizontalScroll} />
|
106
119
|
</Canvas>
|
107
120
|
|
108
121
|
## Resizable Columns
|
109
122
|
|
123
|
+
The `isResizable` prop is passed in the column object to make that column resizzable. Its type is `boolean`. when passed true, the corresponding column becomes resizzable.
|
124
|
+
|
110
125
|
<Canvas>
|
111
126
|
<Story of={NewTableStories.ResizableColumns} />
|
112
127
|
</Canvas>
|
113
128
|
|
114
129
|
## Column Manager
|
115
130
|
|
131
|
+
To enable the column manager feature, you can use `columnManager` prop in the `useLeafyGreenTable` hook. The type of `columnManager` is `boolean`.
|
132
|
+
|
116
133
|
<Canvas>
|
117
134
|
<Story of={NewTableStories.ColumnManager} />
|
118
135
|
</Canvas>
|
119
136
|
|
120
137
|
## With Header
|
121
138
|
|
139
|
+
To display the header above the table, you can pass the `header` prop in the NewTable component. The type of `header` is 'React.ReactNode'. This header can have filters like dropdown filter and global filters.
|
140
|
+
|
122
141
|
<Canvas>
|
123
142
|
<Story of={NewTableStories.WithHeader} />
|
124
143
|
</Canvas>
|
@@ -131,12 +150,16 @@ To enable sorting functionality for your table columns, you can use the `enableS
|
|
131
150
|
|
132
151
|
## With Pagination
|
133
152
|
|
153
|
+
To enable the pagination in the table, you can pass the prop `withPagination: true`.
|
154
|
+
|
134
155
|
<Canvas>
|
135
156
|
<Story of={NewTableStories.WithPagination} />
|
136
157
|
</Canvas>
|
137
158
|
|
138
159
|
## Sticky Columns
|
139
160
|
|
161
|
+
The columns of the table can either be left or right sticky. You can pass `sticky` prop in the column object. The value of will be either `left` or `right`.
|
162
|
+
|
140
163
|
<Canvas>
|
141
164
|
<Story of={NewTableStories.StickyColumns} />
|
142
165
|
</Canvas>
|