@economic/taco 2.58.2-EC-64961.5 → 2.58.2-EC-64961.7
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/taco.cjs +161 -161
- package/dist/taco.cjs.map +1 -1
- package/dist/taco.d.ts +1 -1
- package/dist/taco.js +161 -161
- package/dist/taco.js.map +1 -1
- package/package.json +2 -2
package/dist/taco.d.ts
CHANGED
@@ -3228,7 +3228,7 @@ export declare type TableColumnRendererArgs<TType, TValue> = {
|
|
3228
3228
|
value: TValue;
|
3229
3229
|
};
|
3230
3230
|
|
3231
|
-
export declare type TableColumnRendererControl<TType = unknown> = ((props: TableColumnRendererControlProps, row?: TType, filterState?: TableFilter[]) => JSX.Element) | 'datepicker' | 'input' | 'switch' | 'checkbox' | 'textarea';
|
3231
|
+
export declare type TableColumnRendererControl<TType = unknown> = ((props: TableColumnRendererControlProps, row?: TType, filterState?: TableFilter[]) => JSX.Element | null) | 'datepicker' | 'input' | 'switch' | 'checkbox' | 'textarea';
|
3232
3232
|
|
3233
3233
|
export declare type TableColumnRendererControlProps = {
|
3234
3234
|
className?: string;
|
package/dist/taco.js
CHANGED
@@ -32301,6 +32301,163 @@ function useReactTable(options) {
|
|
32301
32301
|
}));
|
32302
32302
|
return tableRef.current;
|
32303
32303
|
}
|
32304
|
+
var TableFilterComparator = /* @__PURE__ */ ((TableFilterComparator2) => {
|
32305
|
+
TableFilterComparator2[TableFilterComparator2["Contains"] = 0] = "Contains";
|
32306
|
+
TableFilterComparator2[TableFilterComparator2["DoesNotContain"] = 1] = "DoesNotContain";
|
32307
|
+
TableFilterComparator2[TableFilterComparator2["IsEqualTo"] = 2] = "IsEqualTo";
|
32308
|
+
TableFilterComparator2[TableFilterComparator2["IsNotEqualTo"] = 3] = "IsNotEqualTo";
|
32309
|
+
TableFilterComparator2[TableFilterComparator2["IsGreaterThan"] = 4] = "IsGreaterThan";
|
32310
|
+
TableFilterComparator2[TableFilterComparator2["IsLessThan"] = 5] = "IsLessThan";
|
32311
|
+
TableFilterComparator2[TableFilterComparator2["IsBetween"] = 6] = "IsBetween";
|
32312
|
+
TableFilterComparator2[TableFilterComparator2["IsEmpty"] = 7] = "IsEmpty";
|
32313
|
+
TableFilterComparator2[TableFilterComparator2["IsNotEmpty"] = 8] = "IsNotEmpty";
|
32314
|
+
TableFilterComparator2[TableFilterComparator2["IsLessThanOrEqualTo"] = 9] = "IsLessThanOrEqualTo";
|
32315
|
+
TableFilterComparator2[TableFilterComparator2["IsGreaterThanOrEqualTo"] = 10] = "IsGreaterThanOrEqualTo";
|
32316
|
+
TableFilterComparator2[TableFilterComparator2["HasAnyOf"] = 11] = "HasAnyOf";
|
32317
|
+
TableFilterComparator2[TableFilterComparator2["HasAllOf"] = 12] = "HasAllOf";
|
32318
|
+
TableFilterComparator2[TableFilterComparator2["HasNoneOf"] = 13] = "HasNoneOf";
|
32319
|
+
TableFilterComparator2[TableFilterComparator2["IsOneOf"] = 14] = "IsOneOf";
|
32320
|
+
TableFilterComparator2[TableFilterComparator2["IsNoneOf"] = 15] = "IsNoneOf";
|
32321
|
+
return TableFilterComparator2;
|
32322
|
+
})(TableFilterComparator || {});
|
32323
|
+
const dataTypes = {
|
32324
|
+
auto: {
|
32325
|
+
sortingFn: "auto",
|
32326
|
+
filterComparators: [
|
32327
|
+
TableFilterComparator.Contains,
|
32328
|
+
TableFilterComparator.DoesNotContain,
|
32329
|
+
TableFilterComparator.IsEqualTo,
|
32330
|
+
TableFilterComparator.IsNotEqualTo,
|
32331
|
+
TableFilterComparator.IsEmpty,
|
32332
|
+
TableFilterComparator.IsNotEmpty
|
32333
|
+
]
|
32334
|
+
},
|
32335
|
+
// base
|
32336
|
+
text: {
|
32337
|
+
sortingFn: "alphanumeric",
|
32338
|
+
filterComparators: [
|
32339
|
+
TableFilterComparator.Contains,
|
32340
|
+
TableFilterComparator.DoesNotContain,
|
32341
|
+
TableFilterComparator.IsEqualTo,
|
32342
|
+
TableFilterComparator.IsNotEqualTo,
|
32343
|
+
TableFilterComparator.IsEmpty,
|
32344
|
+
TableFilterComparator.IsNotEmpty
|
32345
|
+
]
|
32346
|
+
},
|
32347
|
+
boolean: {
|
32348
|
+
sortingFn: "basic",
|
32349
|
+
filterComparators: [TableFilterComparator.IsEqualTo, TableFilterComparator.IsNotEqualTo]
|
32350
|
+
},
|
32351
|
+
// dates
|
32352
|
+
date: createDatetimeDataType({
|
32353
|
+
day: "2-digit",
|
32354
|
+
month: "2-digit",
|
32355
|
+
year: "2-digit"
|
32356
|
+
}),
|
32357
|
+
time: createDatetimeDataType({
|
32358
|
+
hour: "2-digit",
|
32359
|
+
minute: "2-digit"
|
32360
|
+
}),
|
32361
|
+
datetime: createDatetimeDataType({
|
32362
|
+
day: "2-digit",
|
32363
|
+
month: "2-digit",
|
32364
|
+
year: "2-digit",
|
32365
|
+
hour: "2-digit",
|
32366
|
+
minute: "2-digit"
|
32367
|
+
}),
|
32368
|
+
// numbers
|
32369
|
+
number: createNumberDataType("left"),
|
32370
|
+
amount: createNumberDataType("right", { decimals: 2, useGrouping: true }),
|
32371
|
+
percentage: createNumberDataType("right", { useGrouping: true, percent: true })
|
32372
|
+
};
|
32373
|
+
function createDatetimeDataType(defaultOptions2) {
|
32374
|
+
return {
|
32375
|
+
sortingFn: "datetime",
|
32376
|
+
filterComparators: [
|
32377
|
+
TableFilterComparator.IsEqualTo,
|
32378
|
+
TableFilterComparator.IsNotEqualTo,
|
32379
|
+
TableFilterComparator.IsGreaterThan,
|
32380
|
+
TableFilterComparator.IsLessThan,
|
32381
|
+
TableFilterComparator.IsGreaterThanOrEqualTo,
|
32382
|
+
TableFilterComparator.IsLessThanOrEqualTo,
|
32383
|
+
TableFilterComparator.IsBetween,
|
32384
|
+
TableFilterComparator.IsEmpty,
|
32385
|
+
TableFilterComparator.IsNotEmpty
|
32386
|
+
],
|
32387
|
+
getDisplayValue: (value, row, options) => {
|
32388
|
+
var _a;
|
32389
|
+
if (value === void 0) {
|
32390
|
+
return "";
|
32391
|
+
}
|
32392
|
+
return new Intl.DateTimeFormat((_a = options == null ? void 0 : options.localization) == null ? void 0 : _a.locale, defaultOptions2).format(
|
32393
|
+
typeof value === "string" ? Date.parse(value) : value
|
32394
|
+
);
|
32395
|
+
}
|
32396
|
+
};
|
32397
|
+
}
|
32398
|
+
function createNumberDataType(align, defaultOptions2) {
|
32399
|
+
return {
|
32400
|
+
align,
|
32401
|
+
sortingFn: "basic",
|
32402
|
+
filterComparators: [
|
32403
|
+
TableFilterComparator.IsEqualTo,
|
32404
|
+
TableFilterComparator.IsNotEqualTo,
|
32405
|
+
TableFilterComparator.IsGreaterThan,
|
32406
|
+
TableFilterComparator.IsLessThan,
|
32407
|
+
TableFilterComparator.IsGreaterThanOrEqualTo,
|
32408
|
+
TableFilterComparator.IsLessThanOrEqualTo,
|
32409
|
+
TableFilterComparator.IsBetween,
|
32410
|
+
TableFilterComparator.IsEmpty,
|
32411
|
+
TableFilterComparator.IsNotEmpty
|
32412
|
+
],
|
32413
|
+
getDisplayValue: (value, row, options) => {
|
32414
|
+
var _a, _b;
|
32415
|
+
if (value === void 0) {
|
32416
|
+
return "";
|
32417
|
+
}
|
32418
|
+
const dataTypeOptions = typeof (options == null ? void 0 : options.dataTypeOptions) === "function" ? options == null ? void 0 : options.dataTypeOptions(row) : options == null ? void 0 : options.dataTypeOptions;
|
32419
|
+
const numberFormatOptions = {
|
32420
|
+
// format
|
32421
|
+
useGrouping: (dataTypeOptions == null ? void 0 : dataTypeOptions.useGrouping) ?? (defaultOptions2 == null ? void 0 : defaultOptions2.useGrouping) ?? false,
|
32422
|
+
// decimals
|
32423
|
+
minimumFractionDigits: (dataTypeOptions == null ? void 0 : dataTypeOptions.decimals) ?? (defaultOptions2 == null ? void 0 : defaultOptions2.decimals),
|
32424
|
+
maximumFractionDigits: (dataTypeOptions == null ? void 0 : dataTypeOptions.decimals) ?? (defaultOptions2 == null ? void 0 : defaultOptions2.decimals)
|
32425
|
+
};
|
32426
|
+
if (defaultOptions2 == null ? void 0 : defaultOptions2.percent) {
|
32427
|
+
numberFormatOptions.style = "percent";
|
32428
|
+
} else if (dataTypeOptions == null ? void 0 : dataTypeOptions.currency) {
|
32429
|
+
numberFormatOptions.style = "currency";
|
32430
|
+
numberFormatOptions.currency = dataTypeOptions.currency;
|
32431
|
+
numberFormatOptions.currencyDisplay = "code";
|
32432
|
+
}
|
32433
|
+
let localisedValue = new Intl.NumberFormat((_a = options == null ? void 0 : options.localization) == null ? void 0 : _a.locale, numberFormatOptions).format(Number(value));
|
32434
|
+
if (!numberFormatOptions.useGrouping) {
|
32435
|
+
return localisedValue;
|
32436
|
+
}
|
32437
|
+
let localisedValueWithoutThousandsSeperator = new Intl.NumberFormat((_b = options == null ? void 0 : options.localization) == null ? void 0 : _b.locale, {
|
32438
|
+
...numberFormatOptions,
|
32439
|
+
useGrouping: false
|
32440
|
+
}).format(Number(value));
|
32441
|
+
if (numberFormatOptions.style === "percent" || numberFormatOptions.style === "currency") {
|
32442
|
+
localisedValue = localisedValue.replace(/\u00A0/g, " ");
|
32443
|
+
localisedValueWithoutThousandsSeperator = localisedValueWithoutThousandsSeperator.replace(/\u00A0/g, " ");
|
32444
|
+
}
|
32445
|
+
return [localisedValue, localisedValueWithoutThousandsSeperator];
|
32446
|
+
}
|
32447
|
+
};
|
32448
|
+
}
|
32449
|
+
function getDataTypeProperties(dataType) {
|
32450
|
+
return dataTypes[dataType ?? "text"] ?? dataTypes.text;
|
32451
|
+
}
|
32452
|
+
function getSortingFn(dataType, customFnOrBuiltIn) {
|
32453
|
+
if (typeof customFnOrBuiltIn === "function") {
|
32454
|
+
return (rowA, rowB, columnId) => customFnOrBuiltIn(rowA.original, rowB.original, columnId);
|
32455
|
+
}
|
32456
|
+
if (customFnOrBuiltIn) {
|
32457
|
+
return customFnOrBuiltIn;
|
32458
|
+
}
|
32459
|
+
return getDataTypeProperties(dataType).sortingFn;
|
32460
|
+
}
|
32304
32461
|
var isArray_1;
|
32305
32462
|
var hasRequiredIsArray;
|
32306
32463
|
function requireIsArray() {
|
@@ -32993,161 +33150,6 @@ function requireGet() {
|
|
32993
33150
|
}
|
32994
33151
|
var getExports = requireGet();
|
32995
33152
|
const get = /* @__PURE__ */ getDefaultExportFromCjs(getExports);
|
32996
|
-
var TableFilterComparator = /* @__PURE__ */ ((TableFilterComparator2) => {
|
32997
|
-
TableFilterComparator2[TableFilterComparator2["Contains"] = 0] = "Contains";
|
32998
|
-
TableFilterComparator2[TableFilterComparator2["DoesNotContain"] = 1] = "DoesNotContain";
|
32999
|
-
TableFilterComparator2[TableFilterComparator2["IsEqualTo"] = 2] = "IsEqualTo";
|
33000
|
-
TableFilterComparator2[TableFilterComparator2["IsNotEqualTo"] = 3] = "IsNotEqualTo";
|
33001
|
-
TableFilterComparator2[TableFilterComparator2["IsGreaterThan"] = 4] = "IsGreaterThan";
|
33002
|
-
TableFilterComparator2[TableFilterComparator2["IsLessThan"] = 5] = "IsLessThan";
|
33003
|
-
TableFilterComparator2[TableFilterComparator2["IsBetween"] = 6] = "IsBetween";
|
33004
|
-
TableFilterComparator2[TableFilterComparator2["IsEmpty"] = 7] = "IsEmpty";
|
33005
|
-
TableFilterComparator2[TableFilterComparator2["IsNotEmpty"] = 8] = "IsNotEmpty";
|
33006
|
-
TableFilterComparator2[TableFilterComparator2["IsLessThanOrEqualTo"] = 9] = "IsLessThanOrEqualTo";
|
33007
|
-
TableFilterComparator2[TableFilterComparator2["IsGreaterThanOrEqualTo"] = 10] = "IsGreaterThanOrEqualTo";
|
33008
|
-
TableFilterComparator2[TableFilterComparator2["HasAnyOf"] = 11] = "HasAnyOf";
|
33009
|
-
TableFilterComparator2[TableFilterComparator2["HasAllOf"] = 12] = "HasAllOf";
|
33010
|
-
TableFilterComparator2[TableFilterComparator2["HasNoneOf"] = 13] = "HasNoneOf";
|
33011
|
-
TableFilterComparator2[TableFilterComparator2["IsOneOf"] = 14] = "IsOneOf";
|
33012
|
-
TableFilterComparator2[TableFilterComparator2["IsNoneOf"] = 15] = "IsNoneOf";
|
33013
|
-
return TableFilterComparator2;
|
33014
|
-
})(TableFilterComparator || {});
|
33015
|
-
const dataTypes = {
|
33016
|
-
auto: {
|
33017
|
-
sortingFn: "auto",
|
33018
|
-
filterComparators: [
|
33019
|
-
TableFilterComparator.Contains,
|
33020
|
-
TableFilterComparator.DoesNotContain,
|
33021
|
-
TableFilterComparator.IsEqualTo,
|
33022
|
-
TableFilterComparator.IsNotEqualTo,
|
33023
|
-
TableFilterComparator.IsEmpty,
|
33024
|
-
TableFilterComparator.IsNotEmpty
|
33025
|
-
]
|
33026
|
-
},
|
33027
|
-
// base
|
33028
|
-
text: {
|
33029
|
-
sortingFn: "alphanumeric",
|
33030
|
-
filterComparators: [
|
33031
|
-
TableFilterComparator.Contains,
|
33032
|
-
TableFilterComparator.DoesNotContain,
|
33033
|
-
TableFilterComparator.IsEqualTo,
|
33034
|
-
TableFilterComparator.IsNotEqualTo,
|
33035
|
-
TableFilterComparator.IsEmpty,
|
33036
|
-
TableFilterComparator.IsNotEmpty
|
33037
|
-
]
|
33038
|
-
},
|
33039
|
-
boolean: {
|
33040
|
-
sortingFn: "basic",
|
33041
|
-
filterComparators: [TableFilterComparator.IsEqualTo, TableFilterComparator.IsNotEqualTo]
|
33042
|
-
},
|
33043
|
-
// dates
|
33044
|
-
date: createDatetimeDataType({
|
33045
|
-
day: "2-digit",
|
33046
|
-
month: "2-digit",
|
33047
|
-
year: "2-digit"
|
33048
|
-
}),
|
33049
|
-
time: createDatetimeDataType({
|
33050
|
-
hour: "2-digit",
|
33051
|
-
minute: "2-digit"
|
33052
|
-
}),
|
33053
|
-
datetime: createDatetimeDataType({
|
33054
|
-
day: "2-digit",
|
33055
|
-
month: "2-digit",
|
33056
|
-
year: "2-digit",
|
33057
|
-
hour: "2-digit",
|
33058
|
-
minute: "2-digit"
|
33059
|
-
}),
|
33060
|
-
// numbers
|
33061
|
-
number: createNumberDataType("left"),
|
33062
|
-
amount: createNumberDataType("right", { decimals: 2, useGrouping: true }),
|
33063
|
-
percentage: createNumberDataType("right", { useGrouping: true, percent: true })
|
33064
|
-
};
|
33065
|
-
function createDatetimeDataType(defaultOptions2) {
|
33066
|
-
return {
|
33067
|
-
sortingFn: "datetime",
|
33068
|
-
filterComparators: [
|
33069
|
-
TableFilterComparator.IsEqualTo,
|
33070
|
-
TableFilterComparator.IsNotEqualTo,
|
33071
|
-
TableFilterComparator.IsGreaterThan,
|
33072
|
-
TableFilterComparator.IsLessThan,
|
33073
|
-
TableFilterComparator.IsGreaterThanOrEqualTo,
|
33074
|
-
TableFilterComparator.IsLessThanOrEqualTo,
|
33075
|
-
TableFilterComparator.IsBetween,
|
33076
|
-
TableFilterComparator.IsEmpty,
|
33077
|
-
TableFilterComparator.IsNotEmpty
|
33078
|
-
],
|
33079
|
-
getDisplayValue: (value, row, options) => {
|
33080
|
-
var _a;
|
33081
|
-
if (value === void 0) {
|
33082
|
-
return "";
|
33083
|
-
}
|
33084
|
-
return new Intl.DateTimeFormat((_a = options == null ? void 0 : options.localization) == null ? void 0 : _a.locale, defaultOptions2).format(
|
33085
|
-
typeof value === "string" ? Date.parse(value) : value
|
33086
|
-
);
|
33087
|
-
}
|
33088
|
-
};
|
33089
|
-
}
|
33090
|
-
function createNumberDataType(align, defaultOptions2) {
|
33091
|
-
return {
|
33092
|
-
align,
|
33093
|
-
sortingFn: "basic",
|
33094
|
-
filterComparators: [
|
33095
|
-
TableFilterComparator.IsEqualTo,
|
33096
|
-
TableFilterComparator.IsNotEqualTo,
|
33097
|
-
TableFilterComparator.IsGreaterThan,
|
33098
|
-
TableFilterComparator.IsLessThan,
|
33099
|
-
TableFilterComparator.IsGreaterThanOrEqualTo,
|
33100
|
-
TableFilterComparator.IsLessThanOrEqualTo,
|
33101
|
-
TableFilterComparator.IsBetween,
|
33102
|
-
TableFilterComparator.IsEmpty,
|
33103
|
-
TableFilterComparator.IsNotEmpty
|
33104
|
-
],
|
33105
|
-
getDisplayValue: (value, row, options) => {
|
33106
|
-
var _a, _b;
|
33107
|
-
if (value === void 0) {
|
33108
|
-
return "";
|
33109
|
-
}
|
33110
|
-
const dataTypeOptions = typeof (options == null ? void 0 : options.dataTypeOptions) === "function" ? options == null ? void 0 : options.dataTypeOptions(row) : options == null ? void 0 : options.dataTypeOptions;
|
33111
|
-
const numberFormatOptions = {
|
33112
|
-
// format
|
33113
|
-
useGrouping: (dataTypeOptions == null ? void 0 : dataTypeOptions.useGrouping) ?? (defaultOptions2 == null ? void 0 : defaultOptions2.useGrouping) ?? false,
|
33114
|
-
// decimals
|
33115
|
-
minimumFractionDigits: (dataTypeOptions == null ? void 0 : dataTypeOptions.decimals) ?? (defaultOptions2 == null ? void 0 : defaultOptions2.decimals),
|
33116
|
-
maximumFractionDigits: (dataTypeOptions == null ? void 0 : dataTypeOptions.decimals) ?? (defaultOptions2 == null ? void 0 : defaultOptions2.decimals)
|
33117
|
-
};
|
33118
|
-
if (defaultOptions2 == null ? void 0 : defaultOptions2.percent) {
|
33119
|
-
numberFormatOptions.style = "percent";
|
33120
|
-
} else if (dataTypeOptions == null ? void 0 : dataTypeOptions.currency) {
|
33121
|
-
numberFormatOptions.style = "currency";
|
33122
|
-
numberFormatOptions.currency = dataTypeOptions.currency;
|
33123
|
-
numberFormatOptions.currencyDisplay = "code";
|
33124
|
-
}
|
33125
|
-
const localisedValue = new Intl.NumberFormat((_a = options == null ? void 0 : options.localization) == null ? void 0 : _a.locale, numberFormatOptions).format(
|
33126
|
-
Number(value)
|
33127
|
-
);
|
33128
|
-
if (!numberFormatOptions.useGrouping) {
|
33129
|
-
return localisedValue;
|
33130
|
-
}
|
33131
|
-
const localisedValueWithoutThousandsSeperator = new Intl.NumberFormat((_b = options == null ? void 0 : options.localization) == null ? void 0 : _b.locale, {
|
33132
|
-
...numberFormatOptions,
|
33133
|
-
useGrouping: false
|
33134
|
-
}).format(Number(value));
|
33135
|
-
return [localisedValue, localisedValueWithoutThousandsSeperator];
|
33136
|
-
}
|
33137
|
-
};
|
33138
|
-
}
|
33139
|
-
function getDataTypeProperties(dataType) {
|
33140
|
-
return dataTypes[dataType ?? "text"] ?? dataTypes.text;
|
33141
|
-
}
|
33142
|
-
function getSortingFn(dataType, customFnOrBuiltIn) {
|
33143
|
-
if (typeof customFnOrBuiltIn === "function") {
|
33144
|
-
return (rowA, rowB, columnId) => customFnOrBuiltIn(rowA.original, rowB.original, columnId);
|
33145
|
-
}
|
33146
|
-
if (customFnOrBuiltIn) {
|
33147
|
-
return customFnOrBuiltIn;
|
33148
|
-
}
|
33149
|
-
return getDataTypeProperties(dataType).sortingFn;
|
33150
|
-
}
|
33151
33153
|
const toLowerCase = (value) => String(value ?? "").toLocaleLowerCase();
|
33152
33154
|
const isWeakContains = (left, right) => toLowerCase(left).includes(toLowerCase(right));
|
33153
33155
|
const isWeakEqual = (left, right) => toLowerCase(left) === toLowerCase(right);
|
@@ -33495,8 +33497,8 @@ function processChildren(child, columns, defaultSizing, defaultSorting, defaultV
|
|
33495
33497
|
);
|
33496
33498
|
} else if (React__default.isValidElement(child) && (child.props.accessor || child.props.id)) {
|
33497
33499
|
const {
|
33498
|
-
|
33499
|
-
|
33500
|
+
id: untypedId,
|
33501
|
+
accessor: accessorKey,
|
33500
33502
|
// renderers
|
33501
33503
|
renderer: renderer2,
|
33502
33504
|
aggregate,
|
@@ -33521,6 +33523,7 @@ function processChildren(child, columns, defaultSizing, defaultSorting, defaultV
|
|
33521
33523
|
sortFn,
|
33522
33524
|
...meta
|
33523
33525
|
} = child.props;
|
33526
|
+
const id2 = untypedId ?? accessorKey;
|
33524
33527
|
const dataTypeProperties = getDataTypeProperties(child.props.dataType);
|
33525
33528
|
if (defaultHidden && enableHiding) {
|
33526
33529
|
defaultVisibility[id2] = false;
|
@@ -33537,10 +33540,7 @@ function processChildren(child, columns, defaultSizing, defaultSorting, defaultV
|
|
33537
33540
|
}
|
33538
33541
|
const column = {
|
33539
33542
|
id: id2,
|
33540
|
-
accessorKey
|
33541
|
-
// To avoid errors caused by undefined row data values, we pass accessorFn as a preventive measure
|
33542
|
-
// accessor can be dot notated strings, so we use lodash.get to access deeply nested children
|
33543
|
-
accessorFn: accessor ? (row) => get(row, accessor) : void 0,
|
33543
|
+
accessorKey,
|
33544
33544
|
// The header can be either a string or a JSX.Element, but react-table expects it to be a string or a
|
33545
33545
|
// renderer function, so `() => header` ensures compatibility when header is a JSX.Element.
|
33546
33546
|
// If we just pass `() => header`, then we will loose truncation for string headers.
|