@noraent/nora-datagrid 0.0.40 → 0.0.41

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noraent/nora-datagrid",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "module": "./lib/esm/index.js",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "private": false,
@@ -73,7 +73,7 @@ const DynamicVirtualScroll = React.memo(({ children }) => {
73
73
  const { dataSource } = useSelector((store) => ({
74
74
  dataSource: store.state.dataSource,
75
75
  }));
76
- useSelector((store) => ({
76
+ const { __randomDataSourceKey } = useSelector((store) => ({
77
77
  __randomDataSourceKey: store.__randomDataSourceKey,
78
78
  }));
79
79
  const totalHeight = useMemo(() => dataSource.reduce((sum, item) => sum + item.height, 0), [dataSource]);
@@ -136,7 +136,7 @@ const DynamicVirtualScroll = React.memo(({ children }) => {
136
136
  result.push(dataSource[rowIndex - 1]); // fixedIndex가 범위에 포함되지 않으면 첫 번째에 추가
137
137
  }
138
138
  return result;
139
- }, [JSON.stringify(dataSource), start, end]);
139
+ }, [__randomDataSourceKey, JSON.stringify(dataSource), start, end]);
140
140
  const startColumnIndex = useMemo(() => Math.max(0, binarySearchIndex(cumulativeWidths, scrollLeft) - overscanColumn), [columns, cumulativeWidths, scrollLeft, binarySearchIndex, overscanColumn]);
141
141
  const offsetTop = useMemo(() => cumulativeHeights[start] || 0, [cumulativeHeights, start]);
142
142
  const offsetLeft = useMemo(() => cumulativeWidths[startColumnIndex] || 0, [cumulativeWidths, startColumnIndex]);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noraent/nora-datagrid",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "module": "./lib/esm/index.js",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "private": false,
@@ -73,7 +73,7 @@ const DynamicVirtualScroll = React.memo(({ children }) => {
73
73
  const { dataSource } = useSelector((store) => ({
74
74
  dataSource: store.state.dataSource,
75
75
  }));
76
- useSelector((store) => ({
76
+ const { __randomDataSourceKey } = useSelector((store) => ({
77
77
  __randomDataSourceKey: store.__randomDataSourceKey,
78
78
  }));
79
79
  const totalHeight = useMemo(() => dataSource.reduce((sum, item) => sum + item.height, 0), [dataSource]);
@@ -136,7 +136,7 @@ const DynamicVirtualScroll = React.memo(({ children }) => {
136
136
  result.push(dataSource[rowIndex - 1]); // fixedIndex가 범위에 포함되지 않으면 첫 번째에 추가
137
137
  }
138
138
  return result;
139
- }, [JSON.stringify(dataSource), start, end]);
139
+ }, [__randomDataSourceKey, JSON.stringify(dataSource), start, end]);
140
140
  const startColumnIndex = useMemo(() => Math.max(0, binarySearchIndex(cumulativeWidths, scrollLeft) - overscanColumn), [columns, cumulativeWidths, scrollLeft, binarySearchIndex, overscanColumn]);
141
141
  const offsetTop = useMemo(() => cumulativeHeights[start] || 0, [cumulativeHeights, start]);
142
142
  const offsetLeft = useMemo(() => cumulativeWidths[startColumnIndex] || 0, [cumulativeWidths, startColumnIndex]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noraent/nora-datagrid",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "module": "./lib/esm/index.js",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "private": false,