Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: crash when expanding the first header

thecodrrc1c425450bbe
diff --git a/apps/web/package.json b/apps/web/package.json
index e3d5f180c..9ae2383f3 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -29,7 +29,7 @@
"react-qrcode-logo": "^2.2.1",
"react-scripts": "3.4.1",
"react-virtualized-auto-sizer": "^1.0.2",
- "react-window": "^1.8.5",
+ "react-window": "^1.8.6",
"rebass": "^4.0.7",
"timeago-react": "^3.0.0",
"zustand": "^2.2.3"
diff --git a/apps/web/src/components/list-container/index.js b/apps/web/src/components/list-container/index.js
index 7530afc76..eeb916499 100644
--- a/apps/web/src/components/list-container/index.js
+++ b/apps/web/src/components/list-container/index.js
@@ -60,7 +60,7 @@ function ListContainer(props) {
const item = props.items[index];
if (item.type === "header") {
if (!item.title) return 0;
- return index === expandedGroup ? 203 : 29;
+ return index === expandedGroup ? 208 : 29;
} else {
return profile.itemHeight(item);
}
@@ -80,7 +80,7 @@ function ListContainer(props) {
s === -1 ? index : -1
);
listRef.current.resetAfterIndex(
- index - 1,
+ index,
true
);
}}
diff --git a/apps/web/yarn.lock b/apps/web/yarn.lock
index 11c749b9f..13d451f1b 100644
--- a/apps/web/yarn.lock
+++ b/apps/web/yarn.lock
@@ -8953,8 +8953,8 @@ normalize-url@^3.0.0, normalize-url@^3.0.1:
integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==
"notes-core@git+ssh://[email protected]:streetwriters/notesnook-core.git":
- version "2.3.4"
- resolved "git+ssh://[email protected]:streetwriters/notesnook-core.git#50544909402aeb71895eba66c0fe49b3fb6f46fc"
+ version "2.3.5"
+ resolved "git+ssh://[email protected]:streetwriters/notesnook-core.git#ad776aa4259420fc61f5e5f25bbedef08a6ea91e"
dependencies:
fast-sort "^2.0.1"
fuzzysearch "^1.0.3"
@@ -10849,7 +10849,7 @@ react-virtualized-auto-sizer@^1.0.2:
resolved "https://registry.yarnpkg.com/react-virtualized-auto-sizer/-/react-virtualized-auto-sizer-1.0.2.tgz#a61dd4f756458bbf63bd895a92379f9b70f803bd"
integrity sha512-MYXhTY1BZpdJFjUovvYHVBmkq79szK/k7V3MO+36gJkWGkrXKtyr4vCPtpphaTLRAdDNoYEYFZWE8LjN+PIHNg==
-react-window@^1.8.5:
+react-window@^1.8.6:
version "1.8.6"
resolved "https://registry.yarnpkg.com/react-window/-/react-window-1.8.6.tgz#d011950ac643a994118632665aad0c6382e2a112"
integrity sha512-8VwEEYyjz6DCnGBsd+MgkD0KJ2/OXFULyDtorIiTz+QzwoP94tBoA7CnbtyXMm+cCeAUER5KJcPtWl9cpKbOBg==