mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-24 12:12:54 +01:00
fix: selecting items with shift + click adds 1st item as dup
(fixes streetwriters/notesnook#398)
This commit is contained in:
@@ -135,7 +135,6 @@ function Autosuggest({
|
||||
const text = getInputValue();
|
||||
const isFocused = document.activeElement === inputRef.current;
|
||||
if (isFocused && !text) setFiltered(defaultItems);
|
||||
console.log(isFocused, text);
|
||||
}, [defaultItems, getInputValue]);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -66,7 +66,7 @@ function ListContainer(props) {
|
||||
if (isNaN(endIndex)) return;
|
||||
setSelectedItems([
|
||||
...selectionStore.get().selectedItems,
|
||||
...items.slice(focusedItemIndex.current, endIndex + 1),
|
||||
...items.slice(focusedItemIndex.current + 1, endIndex + 1),
|
||||
]);
|
||||
listItem.firstElementChild.focus();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user