diff --git a/package.json b/package.json index 8da5673..eeb4a60 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "@types/nprogress": "^0.0.29", "@types/react": "^16.8.24", "@types/react-dom": "^16.8.5", - "@types/react-window": "^1.8.1", + "@types/react-window": "^1.8.5", "@types/styled-components": "^5.1.3", "@types/styled-system__css": "^5.0.14", "ini": "^3.0.0", @@ -40,7 +40,7 @@ "react": "^17.0.1", "react-dom": "^17.0.2", "react-use": "^15.3.0", - "react-window": "^1.8.5", + "react-window": "^1.8.7", "styled-components": "^5.2.0", "webext-domain-permission-toggle": "^1.0.0", "webext-dynamic-content-scripts": "^6.0.3", diff --git a/src/components/FileExplorer.tsx b/src/components/FileExplorer.tsx index cd472d9..17525a8 100644 --- a/src/components/FileExplorer.tsx +++ b/src/components/FileExplorer.tsx @@ -282,7 +282,7 @@ function ListView({ width, height, metaData, expandTo, renderNodeContext }: List if (listRef.current && focusedNode?.path) { const index = nodes.findIndex(node => node.path === focusedNode.path) if (index !== -1) { - listRef.current.scrollToItem(index, 'smart') + listRef.current.scrollToItem(index, 'auto') } } }, [focusedNode, nodes]) diff --git a/yarn.lock b/yarn.lock index cfeb6f3..03a8944 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2582,10 +2582,10 @@ dependencies: "@types/react" "*" -"@types/react-window@^1.8.1": - version "1.8.1" - resolved "https://registry.yarnpkg.com/@types/react-window/-/react-window-1.8.1.tgz#6e1ceab2e6f2f78dbf1f774ee0e00f1bb0364bb3" - integrity sha512-V3k1O5cbfZIRa0VVbQ81Ekq/7w42CK1SuiB9U1oPMTxv270D9qUn7rHb3sZoqMkIJFfB1NZxaH7NRDlk+ToDsg== +"@types/react-window@^1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@types/react-window/-/react-window-1.8.5.tgz#285fcc5cea703eef78d90f499e1457e9b5c02fc1" + integrity sha512-V9q3CvhC9Jk9bWBOysPGaWy/Z0lxYcTXLtLipkt2cnRj1JOSFNF7wqGpkScSXMgBwC+fnVRg/7shwgddBG5ICw== dependencies: "@types/react" "*" @@ -9528,10 +9528,10 @@ react-use@^15.3.0: ts-easing "^0.2.0" tslib "^2.0.0" -react-window@^1.8.5: - version "1.8.5" - resolved "https://registry.yarnpkg.com/react-window/-/react-window-1.8.5.tgz#a56b39307e79979721021f5d06a67742ecca52d1" - integrity sha512-HeTwlNa37AFa8MDZFZOKcNEkuF2YflA0hpGPiTT9vR7OawEt+GZbfM6wqkBahD3D3pUjIabQYzsnY/BSJbgq6Q== +react-window@^1.8.7: + version "1.8.7" + resolved "https://registry.yarnpkg.com/react-window/-/react-window-1.8.7.tgz#5e9fd0d23f48f432d7022cdb327219353a15f0d4" + integrity sha512-JHEZbPXBpKMmoNO1bNhoXOOLg/ujhL/BU4IqVU9r8eQPcy5KQnGHIHDRkJ0ns9IM5+Aq5LNwt3j8t3tIrePQzA== dependencies: "@babel/runtime" "^7.0.0" memoize-one ">=3.1.1 <6"