@tanstack/table-core 8.0.0-alpha.61 → 8.0.0-alpha.62
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/build/cjs/core.js +16 -11
- package/build/cjs/core.js.map +1 -1
- package/build/esm/index.js +16 -11
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +320 -320
- package/build/types/core.d.ts +0 -1
- package/build/umd/index.development.js +16 -11
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +1 -1
- package/src/core.ts +21 -11
package/build/types/core.d.ts
CHANGED
|
@@ -24,7 +24,6 @@ export declare type TableCore<TGenerics extends TableGenerics> = {
|
|
|
24
24
|
options: RequiredKeys<TableOptions<TGenerics>, 'state'>;
|
|
25
25
|
setOptions: (newOptions: Updater<TableOptions<TGenerics>>) => void;
|
|
26
26
|
queue: (cb: () => void) => void;
|
|
27
|
-
willUpdate: () => void;
|
|
28
27
|
getState: () => TableState;
|
|
29
28
|
setState: (updater: Updater<TableState>) => void;
|
|
30
29
|
render: <TProps>(template: Renderable<TGenerics, TProps>, props: TProps) => string | null | TGenerics['Rendered'];
|
|
@@ -4083,7 +4083,7 @@
|
|
|
4083
4083
|
}, {}));
|
|
4084
4084
|
|
|
4085
4085
|
var queued = [];
|
|
4086
|
-
var queuedTimeout;
|
|
4086
|
+
var queuedTimeout = false;
|
|
4087
4087
|
|
|
4088
4088
|
var finalInstance = _extends({}, instance, instance._features.reduce(function (obj, feature) {
|
|
4089
4089
|
return Object.assign(obj, feature.createInstance == null ? void 0 : feature.createInstance(instance));
|
|
@@ -4092,20 +4092,25 @@
|
|
|
4092
4092
|
queued.push(cb);
|
|
4093
4093
|
|
|
4094
4094
|
if (!queuedTimeout) {
|
|
4095
|
-
queuedTimeout =
|
|
4096
|
-
|
|
4097
|
-
|
|
4095
|
+
queuedTimeout = true; // Schedule a microtask to run the queued callbacks after
|
|
4096
|
+
// the current call stack (render, etc) has finished.
|
|
4097
|
+
|
|
4098
|
+
Promise.resolve().then(function () {
|
|
4099
|
+
console.log(queued);
|
|
4100
|
+
|
|
4101
|
+
while (queued.length) {
|
|
4102
|
+
queued.shift()();
|
|
4103
|
+
}
|
|
4104
|
+
|
|
4105
|
+
queuedTimeout = false;
|
|
4106
|
+
})["catch"](function (error) {
|
|
4107
|
+
return setTimeout(function () {
|
|
4108
|
+
throw error;
|
|
4098
4109
|
});
|
|
4099
4110
|
});
|
|
4100
4111
|
}
|
|
4101
4112
|
},
|
|
4102
|
-
willUpdate:
|
|
4103
|
-
clearTimeout(queuedTimeout);
|
|
4104
|
-
|
|
4105
|
-
while (queued.length) {
|
|
4106
|
-
queued.shift()();
|
|
4107
|
-
}
|
|
4108
|
-
},
|
|
4113
|
+
// willUpdate: () => {},
|
|
4109
4114
|
initialState: initialState,
|
|
4110
4115
|
reset: function reset() {
|
|
4111
4116
|
instance.setState(instance.initialState);
|