@shoplflow/templates 0.1.22 → 0.1.24
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 +10 -5
- package/dist/index.js +10 -5
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1108,12 +1108,17 @@ var FixedTable = ({ tableState }) => {
|
|
|
1108
1108
|
emptyRowCount = 8
|
|
1109
1109
|
} = tableState;
|
|
1110
1110
|
const handleScroll = React6.useCallback(() => {
|
|
1111
|
-
if (
|
|
1112
|
-
|
|
1113
|
-
headerRef.current.scrollLeft = scrollLeft;
|
|
1114
|
-
tableScrollRef.current.scrollLeft = scrollLeft;
|
|
1111
|
+
if (!bodyRef.current) {
|
|
1112
|
+
return;
|
|
1115
1113
|
}
|
|
1116
|
-
|
|
1114
|
+
const bodyScrollLeft = bodyRef.current.scrollLeft;
|
|
1115
|
+
if (headerRef.current) {
|
|
1116
|
+
headerRef.current.scrollLeft = bodyScrollLeft;
|
|
1117
|
+
}
|
|
1118
|
+
if (tableScrollRef.current) {
|
|
1119
|
+
tableScrollRef.current.scrollLeft = bodyScrollLeft;
|
|
1120
|
+
}
|
|
1121
|
+
}, [bodyRef, headerRef, tableScrollRef]);
|
|
1117
1122
|
const TableColumns = () => /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: table.getVisibleFlatColumns().map((column) => {
|
|
1118
1123
|
const size = column.columnDef.size;
|
|
1119
1124
|
const minSize = column.columnDef.minSize;
|
package/dist/index.js
CHANGED
|
@@ -1102,12 +1102,17 @@ var FixedTable = ({ tableState }) => {
|
|
|
1102
1102
|
emptyRowCount = 8
|
|
1103
1103
|
} = tableState;
|
|
1104
1104
|
const handleScroll = useCallback(() => {
|
|
1105
|
-
if (
|
|
1106
|
-
|
|
1107
|
-
headerRef.current.scrollLeft = scrollLeft;
|
|
1108
|
-
tableScrollRef.current.scrollLeft = scrollLeft;
|
|
1105
|
+
if (!bodyRef.current) {
|
|
1106
|
+
return;
|
|
1109
1107
|
}
|
|
1110
|
-
|
|
1108
|
+
const bodyScrollLeft = bodyRef.current.scrollLeft;
|
|
1109
|
+
if (headerRef.current) {
|
|
1110
|
+
headerRef.current.scrollLeft = bodyScrollLeft;
|
|
1111
|
+
}
|
|
1112
|
+
if (tableScrollRef.current) {
|
|
1113
|
+
tableScrollRef.current.scrollLeft = bodyScrollLeft;
|
|
1114
|
+
}
|
|
1115
|
+
}, [bodyRef, headerRef, tableScrollRef]);
|
|
1111
1116
|
const TableColumns = () => /* @__PURE__ */ jsx("colgroup", { children: table.getVisibleFlatColumns().map((column) => {
|
|
1112
1117
|
const size = column.columnDef.size;
|
|
1113
1118
|
const minSize = column.columnDef.minSize;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shoplflow/templates",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.24",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"react-datepicker": "^7.3.0",
|
|
92
92
|
"react-dom": "^18.2.0",
|
|
93
93
|
"simplebar-react": "^3.2.6",
|
|
94
|
-
"@shoplflow/base": "^0.42.
|
|
94
|
+
"@shoplflow/base": "^0.42.4",
|
|
95
95
|
"@shoplflow/hada-assets": "^0.1.7",
|
|
96
96
|
"@shoplflow/shopl-assets": "^0.12.22",
|
|
97
97
|
"@shoplflow/utils": "^0.7.0"
|