A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix: Selected notes become deselected on scroll (fixes streetwriters/notesnook#427)
thecodrr922af0c40488
diff --git a/apps/web/src/components/list-container/index.js b/apps/web/src/components/list-container/index.jsindex 6793d24ee..784746f00 100644--- a/apps/web/src/components/list-container/index.js+++ b/apps/web/src/components/list-container/index.js@@ -1,4 +1,4 @@-import { useMemo, useRef, useState } from "react";+import { useEffect, useMemo, useRef, useState } from "react";import { Flex, Button } from "rebass";import * as Icon from "../icons";import { Virtuoso } from "react-virtuoso";@@ -29,6 +29,12 @@ function ListContainer(props) {[props.items]);+ useEffect(() => {+ return () => {+ selectionStore.toggleSelectionMode(false);+ };+ }, []);+return (<Flex variant="columnFill">{!props.items.length && props.placeholder ? (diff --git a/apps/web/src/components/list-item/index.js b/apps/web/src/components/list-item/index.jsindex 3a7c14240..90b468819 100644--- a/apps/web/src/components/list-item/index.js+++ b/apps/web/src/components/list-item/index.js@@ -58,12 +58,6 @@ function ListItem(props) {const selectItem = useSelectionStore((store) => store.selectItem);- useEffect(() => {- return () => {- selectionStore.toggleSelectionMode(false);- };- }, []);-return (<Flexref={listItemRef}