schummar-table 0.45.3 → 0.46.0
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/dist/index.cjs +28 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +36 -2
- package/dist/index.js.map +1 -1
- package/dist/mui4Theme.d.cts +1 -1
- package/dist/mui4Theme.d.ts +1 -1
- package/dist/mui5Theme.d.cts +1 -1
- package/dist/mui5Theme.d.ts +1 -1
- package/dist/{types-cAzUt-yT.d.ts → types--1DhsKcT.d.ts} +7 -1
- package/dist/{types-DKqBJ_4v.d.cts → types-rbNpaeJs.d.cts} +7 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5149,9 +5149,36 @@ function Virtualized(_a) {
|
|
|
5149
5149
|
|
|
5150
5150
|
// src/components/table.tsx
|
|
5151
5151
|
var import_jsx_runtime37 = require("@emotion/react/jsx-runtime");
|
|
5152
|
-
|
|
5152
|
+
var Table = (0, import_react42.forwardRef)(_Table);
|
|
5153
|
+
function _Table(props, ref) {
|
|
5153
5154
|
const [table, resetState] = useTableState(props);
|
|
5154
5155
|
const [isHydrated, clearStorage] = useTableStateStorage(table);
|
|
5156
|
+
(0, import_react42.useImperativeHandle)(
|
|
5157
|
+
ref,
|
|
5158
|
+
() => ({
|
|
5159
|
+
setSort(sort) {
|
|
5160
|
+
table.update((state) => {
|
|
5161
|
+
state.sort = sort;
|
|
5162
|
+
});
|
|
5163
|
+
},
|
|
5164
|
+
setSelection(selection) {
|
|
5165
|
+
table.update((state) => {
|
|
5166
|
+
state.selection = selection;
|
|
5167
|
+
});
|
|
5168
|
+
},
|
|
5169
|
+
setExpanded(expanded) {
|
|
5170
|
+
table.update((state) => {
|
|
5171
|
+
state.expanded = expanded;
|
|
5172
|
+
});
|
|
5173
|
+
},
|
|
5174
|
+
setHiddenColumns(hidden) {
|
|
5175
|
+
table.update((state) => {
|
|
5176
|
+
state.hiddenColumns = hidden;
|
|
5177
|
+
});
|
|
5178
|
+
}
|
|
5179
|
+
}),
|
|
5180
|
+
[table]
|
|
5181
|
+
);
|
|
5155
5182
|
function reset() {
|
|
5156
5183
|
return __async(this, null, function* () {
|
|
5157
5184
|
yield clearStorage();
|