@@ -36,23 +37,26 @@ const Item = ({ index, style, data }: ListChildComponentProps<{
previewPageId: string
pagesMap: DataSourceNotionPageMap
isMultipleChoice?: boolean
-}>) => {
+}
+
+const Item = ({
+ index,
+ virtualStart,
+ virtualSize,
+ current,
+ handleToggle,
+ checkedIds,
+ disabledCheckedIds,
+ handleCheck,
+ canPreview,
+ handlePreview,
+ listMapWithChildrenAndDescendants,
+ searchValue,
+ previewPageId,
+ pagesMap,
+ isMultipleChoice,
+}: ItemProps) => {
const { t } = useTranslation()
- const {
- dataList,
- handleToggle,
- checkedIds,
- disabledCheckedIds,
- handleCheck,
- canPreview,
- handlePreview,
- listMapWithChildrenAndDescendants,
- searchValue,
- previewPageId,
- pagesMap,
- isMultipleChoice,
- } = data
- const current = dataList[index]
const currentWithChildrenAndDescendants = listMapWithChildrenAndDescendants[current.page_id]
const hasChild = currentWithChildrenAndDescendants.descendants.size > 0
const ancestors = currentWithChildrenAndDescendants.ancestors
@@ -88,7 +92,15 @@ const Item = ({ index, style, data }: ListChildComponentProps<{
return (
{isMultipleChoice
? (
@@ -149,4 +161,4 @@ const Item = ({ index, style, data }: ListChildComponentProps<{
)
}
-export default React.memo(Item, areEqual)
+export default memo(Item)
diff --git a/web/eslint-suppressions.json b/web/eslint-suppressions.json
index 12cc3ec896..6d5c94f409 100644
--- a/web/eslint-suppressions.json
+++ b/web/eslint-suppressions.json
@@ -1707,12 +1707,7 @@
},
"app/components/datasets/documents/create-from-pipeline/data-source/online-documents/page-selector/index.spec.tsx": {
"ts/no-explicit-any": {
- "count": 5
- }
- },
- "app/components/datasets/documents/create-from-pipeline/data-source/online-documents/page-selector/index.tsx": {
- "react-hooks-extra/no-direct-set-state-in-use-effect": {
- "count": 1
+ "count": 2
}
},
"app/components/datasets/documents/create-from-pipeline/data-source/online-drive/connect/index.spec.tsx": {
diff --git a/web/package.json b/web/package.json
index f224a38351..463ea11894 100644
--- a/web/package.json
+++ b/web/package.json
@@ -136,7 +136,6 @@
"react-sortablejs": "6.1.4",
"react-syntax-highlighter": "15.6.6",
"react-textarea-autosize": "8.5.9",
- "react-window": "1.8.11",
"reactflow": "11.11.4",
"rehype-katex": "7.0.1",
"rehype-raw": "7.0.0",
@@ -193,7 +192,6 @@
"@types/react-dom": "19.2.3",
"@types/react-slider": "1.3.6",
"@types/react-syntax-highlighter": "15.5.13",
- "@types/react-window": "1.8.8",
"@types/semver": "7.7.1",
"@types/sortablejs": "1.15.8",
"@types/uuid": "10.0.0",
diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml
index 3c4bdd91f5..0f88b6499a 100644
--- a/web/pnpm-lock.yaml
+++ b/web/pnpm-lock.yaml
@@ -303,9 +303,6 @@ importers:
react-textarea-autosize:
specifier: 8.5.9
version: 8.5.9(@types/react@19.2.7)(react@19.2.3)
- react-window:
- specifier: 1.8.11
- version: 1.8.11(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
reactflow:
specifier: 11.11.4
version: 11.11.4(@types/react@19.2.7)(immer@11.1.0)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
@@ -469,9 +466,6 @@ importers:
'@types/react-syntax-highlighter':
specifier: 15.5.13
version: 15.5.13
- '@types/react-window':
- specifier: 1.8.8
- version: 1.8.8
'@types/semver':
specifier: 7.7.1
version: 7.7.1
@@ -3746,9 +3740,6 @@ packages:
'@types/react-syntax-highlighter@15.5.13':
resolution: {integrity: sha512-uLGJ87j6Sz8UaBAooU0T6lWJ0dBmjZgN1PZTrj05TNql2/XpC6+4HhMT5syIdFUUt+FASfCeLLv4kBygNU+8qA==}
- '@types/react-window@1.8.8':
- resolution: {integrity: sha512-8Ls660bHR1AUA2kuRvVG9D/4XpRC6wjAaPT9dil7Ckc76eP9TKWZwwmgfq8Q1LANX3QNDnoU4Zp48A3w+zK69Q==}
-
'@types/react@19.2.7':
resolution: {integrity: sha512-MWtvHrGZLFttgeEj28VXHxpmwYbor/ATPYbBfSFZEIRK0ecCFLl2Qo55z52Hss+UV9CRN7trSeq1zbgx7YDWWg==}
@@ -6400,9 +6391,6 @@ packages:
resolution: {integrity: sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==}
engines: {node: '>= 4.0.0'}
- memoize-one@5.2.1:
- resolution: {integrity: sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==}
-
merge-stream@2.0.0:
resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==}
@@ -7357,13 +7345,6 @@ packages:
peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
- react-window@1.8.11:
- resolution: {integrity: sha512-+SRbUVT2scadgFSWx+R1P754xHPEqvcfSfVX10QYg6POOz+WNgkN48pS+BtZNIMGiL1HYrSEiCkwsMS15QogEQ==}
- engines: {node: '>8.0.0'}
- peerDependencies:
- react: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
- react-dom: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
-
react@19.2.3:
resolution: {integrity: sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==}
engines: {node: '>=0.10.0'}
@@ -12179,10 +12160,6 @@ snapshots:
dependencies:
'@types/react': 19.2.7
- '@types/react-window@1.8.8':
- dependencies:
- '@types/react': 19.2.7
-
'@types/react@19.2.7':
dependencies:
csstype: 3.2.3
@@ -15375,8 +15352,6 @@ snapshots:
dependencies:
fs-monkey: 1.1.0
- memoize-one@5.2.1: {}
-
merge-stream@2.0.0: {}
merge2@1.4.1: {}
@@ -16556,13 +16531,6 @@ snapshots:
transitivePeerDependencies:
- '@types/react'
- react-window@1.8.11(react-dom@19.2.3(react@19.2.3))(react@19.2.3):
- dependencies:
- '@babel/runtime': 7.28.4
- memoize-one: 5.2.1
- react: 19.2.3
- react-dom: 19.2.3(react@19.2.3)
-
react@19.2.3: {}
reactflow@11.11.4(@types/react@19.2.7)(immer@11.1.0)(react-dom@19.2.3(react@19.2.3))(react@19.2.3):