schummar-table 0.45.2 → 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 +31 -2
- 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 +39 -3
- 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
|
@@ -4797,7 +4797,9 @@ function ExpandControl({
|
|
|
4797
4797
|
return !!((_a = state.activeItemsById.get(itemId)) == null ? void 0 : _a.children.length);
|
|
4798
4798
|
}
|
|
4799
4799
|
);
|
|
4800
|
-
function toggle2() {
|
|
4800
|
+
function toggle2(e2) {
|
|
4801
|
+
e2.preventDefault();
|
|
4802
|
+
e2.stopPropagation();
|
|
4801
4803
|
const {
|
|
4802
4804
|
props: { expanded: controlledExpanded, expandOnlyOne, onExpandedChange },
|
|
4803
4805
|
expanded,
|
|
@@ -5147,9 +5149,36 @@ function Virtualized(_a) {
|
|
|
5147
5149
|
|
|
5148
5150
|
// src/components/table.tsx
|
|
5149
5151
|
var import_jsx_runtime37 = require("@emotion/react/jsx-runtime");
|
|
5150
|
-
|
|
5152
|
+
var Table = (0, import_react42.forwardRef)(_Table);
|
|
5153
|
+
function _Table(props, ref) {
|
|
5151
5154
|
const [table, resetState] = useTableState(props);
|
|
5152
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
|
+
);
|
|
5153
5182
|
function reset() {
|
|
5154
5183
|
return __async(this, null, function* () {
|
|
5155
5184
|
yield clearStorage();
|