Skip to content

Commit

Permalink
Merge pull request #33 from 0xGG/fix/search-notes
Browse files Browse the repository at this point in the history
fix: Fixed searching notes
  • Loading branch information
shd101wyy authored Apr 3, 2020
2 parents 9fbad02 + c39a8b4 commit 6d087d0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/Notes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,14 @@ export default function Notes(props: Props) {
useEffect(() => {
if (notesListElement) {
// Hack: fix note cards not displaying bug when searchValue is not empty
const initialHeight = notesListElement.style.height;
const initialFlex = notesListElement.style.flex;
notesListElement.style.flex = "initial";
notesListElement.style.height = "10px";
notesListElement.scrollTop += 1;
notesListElement.scrollTop -= 1;
notesListElement.style.height = initialHeight;
notesListElement.style.flex = initialFlex;
}
}, [notes, notesListElement]);

Expand Down

0 comments on commit 6d087d0

Please sign in to comment.