nntc-ui 0.0.60 → 0.0.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/index.js +9 -10
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -3333,19 +3333,18 @@ function VirtualTable(props) {
|
|
|
3333
3333
|
(fb) => fb.type === "numberRange" && fb.values.some((v) => v !== Infinity && v !== -Infinity) || fb.type === "dateRange" && fb.values.some((v) => !dayjs4(v).isSame(dayjs4(0)) && !dayjs4(v).isSame(dayjs4(Number.MAX_SAFE_INTEGER)))
|
|
3334
3334
|
) ? [] : newRows;
|
|
3335
3335
|
const sorted = sortBy.length ? recursiveSort(filtered, sortBy) : filtered;
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
}
|
|
3336
|
+
const result = rowNumberColumnId ? sorted.map((row, index) => ({
|
|
3337
|
+
...row,
|
|
3338
|
+
[rowNumberColumnId]: {
|
|
3339
|
+
value: index + 1
|
|
3340
|
+
}
|
|
3341
|
+
})) : sorted;
|
|
3343
3342
|
window.dispatchEvent(
|
|
3344
3343
|
new CustomEvent("filteringRows", {
|
|
3345
|
-
detail:
|
|
3344
|
+
detail: result
|
|
3346
3345
|
})
|
|
3347
3346
|
);
|
|
3348
|
-
return
|
|
3347
|
+
return result;
|
|
3349
3348
|
}, [rows, sortBy, filterBy, rowNumberColumnId]);
|
|
3350
3349
|
const columnsEstimateSize = useMemo8(
|
|
3351
3350
|
() => cellWidth ?? ((index) => memoizedColumns[index]?.meta?.width ?? 200),
|
|
@@ -3502,7 +3501,7 @@ function VirtualTable(props) {
|
|
|
3502
3501
|
children: headerGroups.map((headerGroup, hgi) => {
|
|
3503
3502
|
const innerCell = (header2) => {
|
|
3504
3503
|
const headerMeta = header2.column.columnDef.meta;
|
|
3505
|
-
return /* @__PURE__ */ jsx34("div", { className: classnames22(thCell), children: header2.column.columnDef.id === header2.column.columnDef["accessorKey"] && (headerMeta?.sortable || headerMeta?.filtrationByValue || headerMeta?.filtrationByDate || headerMeta?.filtrationByNumber || headerMeta && showUniqueValuesCount) ? /* @__PURE__ */ jsx34(
|
|
3504
|
+
return /* @__PURE__ */ jsx34("div", { className: classnames22(thCell), children: header2.column.columnDef.id === header2.column.columnDef["accessorKey"] && header2.column.columnDef.id !== rowNumberColumnId && (headerMeta?.sortable || headerMeta?.filtrationByValue || headerMeta?.filtrationByDate || headerMeta?.filtrationByNumber || headerMeta && showUniqueValuesCount) ? /* @__PURE__ */ jsx34(
|
|
3506
3505
|
HeaderDropdown,
|
|
3507
3506
|
{
|
|
3508
3507
|
headerMeta,
|