@infinite-table/infinite-react 0.2.9 → 0.2.10
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/index.d.ts +7 -7
- package/index.esm.js +39 -21
- package/index.js +39 -21
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -441,6 +441,8 @@ declare type InfiniteTableBaseColumn<T> = {
|
|
|
441
441
|
valueGetter?: InfiniteTableColumnValueGetter<T>;
|
|
442
442
|
defaultWidth?: number;
|
|
443
443
|
defaultFlex?: number;
|
|
444
|
+
minWidth?: number;
|
|
445
|
+
maxWidth?: number;
|
|
444
446
|
};
|
|
445
447
|
declare type InfiniteTableColumn<T> = {} & InfiniteTableBaseColumn<T> & InfiniteTableColumnWithRenderOrRenderValueOrFieldOrValueGetter<T>;
|
|
446
448
|
declare type InfiniteTableGeneratedGroupColumn<T> = InfiniteTableColumn<T> & {
|
|
@@ -637,16 +639,14 @@ declare type InfiniteTableColumnType<T> = {
|
|
|
637
639
|
render?: InfiniteTableColumn<T>['render'];
|
|
638
640
|
valueGetter?: InfiniteTableColumn<T>['valueGetter'];
|
|
639
641
|
};
|
|
640
|
-
declare type
|
|
641
|
-
declare type InfiniteTablePropColumnTypes<T> = InfiniteTablePropColumnTypesMap<T> | Record<'default' | string, InfiniteTableColumnType<T>>;
|
|
642
|
+
declare type InfiniteTablePropColumnTypes<T> = Record<'default' | string, InfiniteTableColumnType<T>>;
|
|
642
643
|
declare type InfiniteTableColumnSizingOptions = {
|
|
643
644
|
flex?: number;
|
|
644
645
|
width?: number;
|
|
645
646
|
minWidth?: number;
|
|
646
647
|
maxWidth?: number;
|
|
647
648
|
};
|
|
648
|
-
declare type
|
|
649
|
-
declare type InfiniteTablePropColumnSizing = InfiniteTablePropColumnSizingMap | Record<string, InfiniteTableColumnSizingOptions>;
|
|
649
|
+
declare type InfiniteTablePropColumnSizing = Record<string, InfiniteTableColumnSizingOptions>;
|
|
650
650
|
declare type InfiniteTableImperativeApi<T> = {
|
|
651
651
|
setColumnOrder: (columnOrder: InfiniteTablePropColumnOrder) => void;
|
|
652
652
|
setColumnVisibility: (columnVisibility: InfiniteTablePropColumnVisibility) => void;
|
|
@@ -861,8 +861,8 @@ interface InfiniteTableMappedState<T> {
|
|
|
861
861
|
licenseKey: NonUndefined<InfiniteTableProps<T>['licenseKey']>;
|
|
862
862
|
columnVisibility: InfiniteTablePropColumnVisibility;
|
|
863
863
|
columnPinning: InfiniteTablePropColumnPinningMap;
|
|
864
|
-
columnSizing:
|
|
865
|
-
columnTypes:
|
|
864
|
+
columnSizing: InfiniteTablePropColumnSizing;
|
|
865
|
+
columnTypes: InfiniteTablePropColumnTypes<T>;
|
|
866
866
|
columnGroups: InfiniteTablePropColumnGroupsMap;
|
|
867
867
|
collapsedColumnGroups: NonUndefined<InfiniteTableProps<T>['collapsedColumnGroups']>;
|
|
868
868
|
pivotTotalColumnPosition: NonUndefined<InfiniteTableProps<T>['pivotTotalColumnPosition']>;
|
|
@@ -958,4 +958,4 @@ declare function interceptMap<K, V>(map: Map<K, V>, fns: InterceptedMapFns<K, V>
|
|
|
958
958
|
|
|
959
959
|
declare function useEffectWithChanges(fn: (changes: Record<string, any>, prevValues: Record<string, any>) => void | (() => void), deps: Record<string, any>): void;
|
|
960
960
|
|
|
961
|
-
export { DataSource, DataSourceAction, DataSourceActionType, DataSourceAggregationReducer, DataSourceComponentActions, DataSourceContextValue, DataSourceData, DataSourceDataParams, DataSourceDataParamsChanges, DataSourceDerivedState, DataSourceExpandedAndCollapsedGroupRows, DataSourceGroupBy, DataSourceGroupRowsList, DataSourceLivePaginationCursorFn, DataSourceLivePaginationCursorParams, DataSourceLivePaginationCursorValue, DataSourceMappedState, DataSourceMappings, DataSourcePivotBy, DataSourcePropAggregationReducers, DataSourcePropGroupBy, DataSourcePropLivePaginationCursor, DataSourcePropPivotBy, DataSourceProps, DataSourceReducer, DataSourceRemoteData, DataSourceSetupState, DataSourceSingleSortInfo, DataSourceSortInfo, DataSourceState, GroupRowsState, InfiniteTable, InfiniteTableAction, InfiniteTableActionType, InfiniteTableClassName, InfiniteTableColumn, InfiniteTableColumnAggregator, InfiniteTableColumnComparer, InfiniteTableColumnGroup, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam, InfiniteTableColumnRowspanParam, InfiniteTableColumnSizingOptions, InfiniteTableComponent, InfiniteTableComputedColumn, InfiniteTableComputedValues, InfiniteTableContextValue, InfiniteTableGroupColumnBase, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnGetterOptions, InfiniteTableImperativeApi, InfiniteTablePropColumnGroups, InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnSizing,
|
|
961
|
+
export { DataSource, DataSourceAction, DataSourceActionType, DataSourceAggregationReducer, DataSourceComponentActions, DataSourceContextValue, DataSourceData, DataSourceDataParams, DataSourceDataParamsChanges, DataSourceDerivedState, DataSourceExpandedAndCollapsedGroupRows, DataSourceGroupBy, DataSourceGroupRowsList, DataSourceLivePaginationCursorFn, DataSourceLivePaginationCursorParams, DataSourceLivePaginationCursorValue, DataSourceMappedState, DataSourceMappings, DataSourcePivotBy, DataSourcePropAggregationReducers, DataSourcePropGroupBy, DataSourcePropLivePaginationCursor, DataSourcePropPivotBy, DataSourceProps, DataSourceReducer, DataSourceRemoteData, DataSourceSetupState, DataSourceSingleSortInfo, DataSourceSortInfo, DataSourceState, GroupRowsState, InfiniteTable, InfiniteTableAction, InfiniteTableActionType, InfiniteTableClassName, InfiniteTableColumn, InfiniteTableColumnAggregator, InfiniteTableColumnComparer, InfiniteTableColumnGroup, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam, InfiniteTableColumnRowspanParam, InfiniteTableColumnSizingOptions, InfiniteTableComponent, InfiniteTableComputedColumn, InfiniteTableComputedValues, InfiniteTableContextValue, InfiniteTableGroupColumnBase, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnGetterOptions, InfiniteTableImperativeApi, InfiniteTablePropColumnGroups, InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnSizing, InfiniteTablePropColumnTypes, InfiniteTablePropColumnVisibility, InfiniteTablePropColumns, InfiniteTablePropColumnsMap, InfiniteTablePropComponents, InfiniteTablePropGroupColumn, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropRowClassName, InfiniteTablePropRowStyle, InfiniteTableProps, InfiniteTableRowClassNameFn, InfiniteTableRowInfo, InfiniteTableRowStyleFn, InfiniteTableState, LazyGroupDataDeepMap, LazyGroupDataItem, LazyGroupRowInfo, Scrollbars, flatten, getComponentStateRoot, group, interceptMap, multisort, useComponentState, useDataSource, useEffectWithChanges };
|
package/index.esm.js
CHANGED
|
@@ -822,8 +822,8 @@ var forwardProps = (setupState) => {
|
|
|
822
822
|
columns: (columns) => toMap(columns, setupState.propsCache.get("columns")),
|
|
823
823
|
columnVisibility: (columnVisibility) => columnVisibility != null ? columnVisibility : {},
|
|
824
824
|
columnPinning: (columnPinning) => toMap(columnPinning, setupState.propsCache.get("columnPinning")),
|
|
825
|
-
columnSizing: (columnSizing) =>
|
|
826
|
-
columnTypes: (columnTypes) =>
|
|
825
|
+
columnSizing: (columnSizing) => columnSizing || {},
|
|
826
|
+
columnTypes: (columnTypes) => columnTypes || {},
|
|
827
827
|
collapsedColumnGroups: (collapsedColumnGroups) => collapsedColumnGroups != null ? collapsedColumnGroups : new Map(),
|
|
828
828
|
columnGroups: (columnGroups) => toMap(columnGroups, setupState.propsCache.get("columnGroups"))
|
|
829
829
|
};
|
|
@@ -1192,7 +1192,7 @@ function getScrollbarWidth() {
|
|
|
1192
1192
|
// src/components/InfiniteTable/utils/getColumnComputedType.ts
|
|
1193
1193
|
var emptyType = Object.freeze({});
|
|
1194
1194
|
function getColumnComputedType(column, columnTypes) {
|
|
1195
|
-
const defaultType = columnTypes
|
|
1195
|
+
const defaultType = columnTypes["default"] || emptyType;
|
|
1196
1196
|
if (column.type === void 0) {
|
|
1197
1197
|
return defaultType;
|
|
1198
1198
|
}
|
|
@@ -1200,10 +1200,26 @@ function getColumnComputedType(column, columnTypes) {
|
|
|
1200
1200
|
return emptyType;
|
|
1201
1201
|
}
|
|
1202
1202
|
if (typeof column.type === "string") {
|
|
1203
|
-
const type = columnTypes
|
|
1203
|
+
const type = columnTypes[column.type] || emptyType;
|
|
1204
1204
|
return type;
|
|
1205
1205
|
}
|
|
1206
|
-
return column.type.reduce((acc, columnType) => Object.assign(acc, columnTypes
|
|
1206
|
+
return column.type.reduce((acc, columnType) => Object.assign(acc, columnTypes[columnType]), {});
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
// src/components/InfiniteTable/utils/assignFiltered.ts
|
|
1210
|
+
function assignFiltered(filterFn, target, ...rest) {
|
|
1211
|
+
let result = target;
|
|
1212
|
+
rest.forEach((obj) => {
|
|
1213
|
+
for (const key in obj) {
|
|
1214
|
+
if (obj.hasOwnProperty(key) && filterFn(obj[key], key)) {
|
|
1215
|
+
result[key] = obj[key];
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
});
|
|
1219
|
+
return result;
|
|
1220
|
+
}
|
|
1221
|
+
function assignNonNull(target, ...rest) {
|
|
1222
|
+
return assignFiltered((value) => value != null, target, ...rest);
|
|
1207
1223
|
}
|
|
1208
1224
|
|
|
1209
1225
|
// src/components/InfiniteTable/utils/getComputedVisibleColumns.ts
|
|
@@ -1266,7 +1282,7 @@ var getComputedVisibleColumns = ({
|
|
|
1266
1282
|
maxSize: columnMaxWidth,
|
|
1267
1283
|
minSize: columnMinWidth,
|
|
1268
1284
|
items: visibleColumnOrder.map((colId) => {
|
|
1269
|
-
var _a, _b, _c, _d;
|
|
1285
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1270
1286
|
const column = columns.get(colId);
|
|
1271
1287
|
const colType = getColumnComputedType(column, columnTypes);
|
|
1272
1288
|
const colTypeSizing = {
|
|
@@ -1275,21 +1291,23 @@ var getComputedVisibleColumns = ({
|
|
|
1275
1291
|
width: colType == null ? void 0 : colType.defaultWidth,
|
|
1276
1292
|
flex: colType == null ? void 0 : colType.defaultFlex
|
|
1277
1293
|
};
|
|
1278
|
-
let colSizing =
|
|
1294
|
+
let colSizing = assignNonNull({
|
|
1279
1295
|
width: column == null ? void 0 : column.defaultWidth,
|
|
1280
|
-
flex: column == null ? void 0 : column.defaultFlex
|
|
1281
|
-
|
|
1296
|
+
flex: column == null ? void 0 : column.defaultFlex,
|
|
1297
|
+
minWidth: column == null ? void 0 : column.minWidth,
|
|
1298
|
+
maxWidth: column == null ? void 0 : column.maxWidth
|
|
1299
|
+
}, columnSizing[colId]);
|
|
1282
1300
|
if (colSizing.width != null) {
|
|
1283
1301
|
delete colTypeSizing.flex;
|
|
1284
1302
|
}
|
|
1285
1303
|
if (colSizing.flex != null) {
|
|
1286
1304
|
delete colTypeSizing.width;
|
|
1287
1305
|
}
|
|
1288
|
-
colSizing =
|
|
1306
|
+
colSizing = assignNonNull(colTypeSizing, colSizing);
|
|
1289
1307
|
let colFlex = (_a = colSizing.flex) != null ? _a : void 0;
|
|
1290
|
-
const colMinWidth = (_b = colSizing.minWidth) != null ? _b : columnMinWidth;
|
|
1291
|
-
const colMaxWidth = (
|
|
1292
|
-
let size = colFlex != void 0 ? void 0 : (
|
|
1308
|
+
const colMinWidth = (_c = (_b = colSizing.minWidth) != null ? _b : column == null ? void 0 : column.minWidth) != null ? _c : columnMinWidth;
|
|
1309
|
+
const colMaxWidth = (_e = (_d = colSizing.maxWidth) != null ? _d : column == null ? void 0 : column.maxWidth) != null ? _e : columnMaxWidth;
|
|
1310
|
+
let size = colFlex != void 0 ? void 0 : (_f = colSizing.width) != null ? _f : columnDefaultWidth;
|
|
1293
1311
|
if (!size && colFlex == void 0) {
|
|
1294
1312
|
size = colMinWidth;
|
|
1295
1313
|
}
|
|
@@ -1563,8 +1581,6 @@ var useComputedVisibleColumns = ({
|
|
|
1563
1581
|
columnVisibilityAssumeVisible,
|
|
1564
1582
|
columnSizing
|
|
1565
1583
|
}) => {
|
|
1566
|
-
const columnsSizingRenderId = useRerenderOnKeyChange(columnSizing);
|
|
1567
|
-
const columnTypesRenderId = useRerenderOnKeyChange(columnTypes);
|
|
1568
1584
|
const columnsRenderId = useRerenderOnKeyChange(columns);
|
|
1569
1585
|
const pinningRenderId = useRerenderOnKeyChange(columnPinning);
|
|
1570
1586
|
const {
|
|
@@ -1621,9 +1637,7 @@ var useComputedVisibleColumns = ({
|
|
|
1621
1637
|
pinnedStartMaxWidth,
|
|
1622
1638
|
columnPinning,
|
|
1623
1639
|
columnsRenderId,
|
|
1624
|
-
|
|
1625
|
-
pinningRenderId,
|
|
1626
|
-
columnTypesRenderId
|
|
1640
|
+
pinningRenderId
|
|
1627
1641
|
]);
|
|
1628
1642
|
const result = {
|
|
1629
1643
|
columns,
|
|
@@ -5499,7 +5513,9 @@ function InfiniteTableHeaderFn(props) {
|
|
|
5499
5513
|
}, [computedVisibleColumnsMap, columns, repaintId, headerHeight]);
|
|
5500
5514
|
useEffect14(() => {
|
|
5501
5515
|
const onScroll = (scrollPosition) => {
|
|
5502
|
-
domRef.current
|
|
5516
|
+
if (domRef.current) {
|
|
5517
|
+
domRef.current.style.transform = `translate3d(-${scrollPosition.scrollLeft}px, 0px, 0px)`;
|
|
5518
|
+
}
|
|
5503
5519
|
};
|
|
5504
5520
|
const removeOnScroll = brain.onScroll(onScroll);
|
|
5505
5521
|
return removeOnScroll;
|
|
@@ -5777,7 +5793,9 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
|
|
|
5777
5793
|
return;
|
|
5778
5794
|
}
|
|
5779
5795
|
const onScroll = (scrollPosition) => {
|
|
5780
|
-
|
|
5796
|
+
if (domRef.current) {
|
|
5797
|
+
UPDATE_SCROLL(domRef.current, scrollPosition);
|
|
5798
|
+
}
|
|
5781
5799
|
};
|
|
5782
5800
|
const removeOnScroll = scroller.onScroll(onScroll);
|
|
5783
5801
|
return removeOnScroll;
|
|
@@ -7833,7 +7851,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
7833
7851
|
const valid = useMemo13(() => {
|
|
7834
7852
|
let valid2 = isValidLicense(licenseKey, {
|
|
7835
7853
|
publishedAt: 1624970570587,
|
|
7836
|
-
version: "0.2.
|
|
7854
|
+
version: "0.2.10"
|
|
7837
7855
|
});
|
|
7838
7856
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
7839
7857
|
return true;
|
package/index.js
CHANGED
|
@@ -839,8 +839,8 @@ var forwardProps = (setupState) => {
|
|
|
839
839
|
columns: (columns) => toMap(columns, setupState.propsCache.get("columns")),
|
|
840
840
|
columnVisibility: (columnVisibility) => columnVisibility != null ? columnVisibility : {},
|
|
841
841
|
columnPinning: (columnPinning) => toMap(columnPinning, setupState.propsCache.get("columnPinning")),
|
|
842
|
-
columnSizing: (columnSizing) =>
|
|
843
|
-
columnTypes: (columnTypes) =>
|
|
842
|
+
columnSizing: (columnSizing) => columnSizing || {},
|
|
843
|
+
columnTypes: (columnTypes) => columnTypes || {},
|
|
844
844
|
collapsedColumnGroups: (collapsedColumnGroups) => collapsedColumnGroups != null ? collapsedColumnGroups : new Map(),
|
|
845
845
|
columnGroups: (columnGroups) => toMap(columnGroups, setupState.propsCache.get("columnGroups"))
|
|
846
846
|
};
|
|
@@ -1201,7 +1201,7 @@ function getScrollbarWidth() {
|
|
|
1201
1201
|
// src/components/InfiniteTable/utils/getColumnComputedType.ts
|
|
1202
1202
|
var emptyType = Object.freeze({});
|
|
1203
1203
|
function getColumnComputedType(column, columnTypes) {
|
|
1204
|
-
const defaultType = columnTypes
|
|
1204
|
+
const defaultType = columnTypes["default"] || emptyType;
|
|
1205
1205
|
if (column.type === void 0) {
|
|
1206
1206
|
return defaultType;
|
|
1207
1207
|
}
|
|
@@ -1209,10 +1209,26 @@ function getColumnComputedType(column, columnTypes) {
|
|
|
1209
1209
|
return emptyType;
|
|
1210
1210
|
}
|
|
1211
1211
|
if (typeof column.type === "string") {
|
|
1212
|
-
const type = columnTypes
|
|
1212
|
+
const type = columnTypes[column.type] || emptyType;
|
|
1213
1213
|
return type;
|
|
1214
1214
|
}
|
|
1215
|
-
return column.type.reduce((acc, columnType) => Object.assign(acc, columnTypes
|
|
1215
|
+
return column.type.reduce((acc, columnType) => Object.assign(acc, columnTypes[columnType]), {});
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
// src/components/InfiniteTable/utils/assignFiltered.ts
|
|
1219
|
+
function assignFiltered(filterFn, target, ...rest) {
|
|
1220
|
+
let result = target;
|
|
1221
|
+
rest.forEach((obj) => {
|
|
1222
|
+
for (const key in obj) {
|
|
1223
|
+
if (obj.hasOwnProperty(key) && filterFn(obj[key], key)) {
|
|
1224
|
+
result[key] = obj[key];
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
});
|
|
1228
|
+
return result;
|
|
1229
|
+
}
|
|
1230
|
+
function assignNonNull(target, ...rest) {
|
|
1231
|
+
return assignFiltered((value) => value != null, target, ...rest);
|
|
1216
1232
|
}
|
|
1217
1233
|
|
|
1218
1234
|
// src/components/InfiniteTable/utils/getComputedVisibleColumns.ts
|
|
@@ -1275,7 +1291,7 @@ var getComputedVisibleColumns = ({
|
|
|
1275
1291
|
maxSize: columnMaxWidth,
|
|
1276
1292
|
minSize: columnMinWidth,
|
|
1277
1293
|
items: visibleColumnOrder.map((colId) => {
|
|
1278
|
-
var _a, _b, _c, _d;
|
|
1294
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1279
1295
|
const column = columns.get(colId);
|
|
1280
1296
|
const colType = getColumnComputedType(column, columnTypes);
|
|
1281
1297
|
const colTypeSizing = {
|
|
@@ -1284,21 +1300,23 @@ var getComputedVisibleColumns = ({
|
|
|
1284
1300
|
width: colType == null ? void 0 : colType.defaultWidth,
|
|
1285
1301
|
flex: colType == null ? void 0 : colType.defaultFlex
|
|
1286
1302
|
};
|
|
1287
|
-
let colSizing =
|
|
1303
|
+
let colSizing = assignNonNull({
|
|
1288
1304
|
width: column == null ? void 0 : column.defaultWidth,
|
|
1289
|
-
flex: column == null ? void 0 : column.defaultFlex
|
|
1290
|
-
|
|
1305
|
+
flex: column == null ? void 0 : column.defaultFlex,
|
|
1306
|
+
minWidth: column == null ? void 0 : column.minWidth,
|
|
1307
|
+
maxWidth: column == null ? void 0 : column.maxWidth
|
|
1308
|
+
}, columnSizing[colId]);
|
|
1291
1309
|
if (colSizing.width != null) {
|
|
1292
1310
|
delete colTypeSizing.flex;
|
|
1293
1311
|
}
|
|
1294
1312
|
if (colSizing.flex != null) {
|
|
1295
1313
|
delete colTypeSizing.width;
|
|
1296
1314
|
}
|
|
1297
|
-
colSizing =
|
|
1315
|
+
colSizing = assignNonNull(colTypeSizing, colSizing);
|
|
1298
1316
|
let colFlex = (_a = colSizing.flex) != null ? _a : void 0;
|
|
1299
|
-
const colMinWidth = (_b = colSizing.minWidth) != null ? _b : columnMinWidth;
|
|
1300
|
-
const colMaxWidth = (
|
|
1301
|
-
let size = colFlex != void 0 ? void 0 : (
|
|
1317
|
+
const colMinWidth = (_c = (_b = colSizing.minWidth) != null ? _b : column == null ? void 0 : column.minWidth) != null ? _c : columnMinWidth;
|
|
1318
|
+
const colMaxWidth = (_e = (_d = colSizing.maxWidth) != null ? _d : column == null ? void 0 : column.maxWidth) != null ? _e : columnMaxWidth;
|
|
1319
|
+
let size = colFlex != void 0 ? void 0 : (_f = colSizing.width) != null ? _f : columnDefaultWidth;
|
|
1302
1320
|
if (!size && colFlex == void 0) {
|
|
1303
1321
|
size = colMinWidth;
|
|
1304
1322
|
}
|
|
@@ -1572,8 +1590,6 @@ var useComputedVisibleColumns = ({
|
|
|
1572
1590
|
columnVisibilityAssumeVisible,
|
|
1573
1591
|
columnSizing
|
|
1574
1592
|
}) => {
|
|
1575
|
-
const columnsSizingRenderId = useRerenderOnKeyChange(columnSizing);
|
|
1576
|
-
const columnTypesRenderId = useRerenderOnKeyChange(columnTypes);
|
|
1577
1593
|
const columnsRenderId = useRerenderOnKeyChange(columns);
|
|
1578
1594
|
const pinningRenderId = useRerenderOnKeyChange(columnPinning);
|
|
1579
1595
|
const {
|
|
@@ -1630,9 +1646,7 @@ var useComputedVisibleColumns = ({
|
|
|
1630
1646
|
pinnedStartMaxWidth,
|
|
1631
1647
|
columnPinning,
|
|
1632
1648
|
columnsRenderId,
|
|
1633
|
-
|
|
1634
|
-
pinningRenderId,
|
|
1635
|
-
columnTypesRenderId
|
|
1649
|
+
pinningRenderId
|
|
1636
1650
|
]);
|
|
1637
1651
|
const result = {
|
|
1638
1652
|
columns,
|
|
@@ -5452,7 +5466,9 @@ function InfiniteTableHeaderFn(props) {
|
|
|
5452
5466
|
}, [computedVisibleColumnsMap, columns, repaintId, headerHeight]);
|
|
5453
5467
|
(0, import_react26.useEffect)(() => {
|
|
5454
5468
|
const onScroll = (scrollPosition) => {
|
|
5455
|
-
domRef.current
|
|
5469
|
+
if (domRef.current) {
|
|
5470
|
+
domRef.current.style.transform = `translate3d(-${scrollPosition.scrollLeft}px, 0px, 0px)`;
|
|
5471
|
+
}
|
|
5456
5472
|
};
|
|
5457
5473
|
const removeOnScroll = brain.onScroll(onScroll);
|
|
5458
5474
|
return removeOnScroll;
|
|
@@ -5721,7 +5737,9 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
|
|
|
5721
5737
|
return;
|
|
5722
5738
|
}
|
|
5723
5739
|
const onScroll = (scrollPosition) => {
|
|
5724
|
-
|
|
5740
|
+
if (domRef.current) {
|
|
5741
|
+
UPDATE_SCROLL(domRef.current, scrollPosition);
|
|
5742
|
+
}
|
|
5725
5743
|
};
|
|
5726
5744
|
const removeOnScroll = scroller.onScroll(onScroll);
|
|
5727
5745
|
return removeOnScroll;
|
|
@@ -7740,7 +7758,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
7740
7758
|
const valid = (0, import_react43.useMemo)(() => {
|
|
7741
7759
|
let valid2 = isValidLicense(licenseKey, {
|
|
7742
7760
|
publishedAt: 1624970570587,
|
|
7743
|
-
version: "0.2.
|
|
7761
|
+
version: "0.2.10"
|
|
7744
7762
|
});
|
|
7745
7763
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
7746
7764
|
return true;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infinite-table/infinite-react",
|
|
3
3
|
"description": "Infinite Table for React",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.10",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.esm.js",
|
|
7
7
|
"typings": "index.d.ts",
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
},
|
|
15
15
|
"license": "Commercial & Open Source",
|
|
16
16
|
"//": "will be updated at build time",
|
|
17
|
-
"publishedAt":
|
|
17
|
+
"publishedAt": 1646346500550
|
|
18
18
|
}
|