This repository was archived by the owner on May 12, 2026. It is now read-only.
Click a note link will now select the right folder note and not /home#2941
Merged
Conversation
…that will be selected
Contributor
Author
ZeroX-DG
suggested changes
Mar 22, 2019
| this.focusNote(selectedNoteKeys, noteHash, '/home') | ||
|
|
||
| let locationToSelect = '/home' | ||
| const notesByHash = data.noteMap.map((note) => note).filter((note) => note.key === noteHash) |
Member
There was a problem hiding this comment.
Why don't you use find instead of filter? Can you explain it to me?
Contributor
Author
There was a problem hiding this comment.
@ZeroX-DG Thanks for your Feedback. I was inspired by the handleNoteClick function in NoteList/index.js. I've changed the code and using the find function to get the first note and not all notes that matching the key (which always will be one).
ZeroX-DG
suggested changes
Mar 22, 2019
ZeroX-DG
left a comment
Member
There was a problem hiding this comment.
I'm sorry but I just can't hold it. Sometimes, I think I have OCD 😄
Co-Authored-By: dredav <dredav@users.noreply.github.com>
Contributor
Author
@ZeroX-DG Thanks for you suggestion. I have applied it. |
ZeroX-DG
approved these changes
Mar 24, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
After following a link to an other note the folder /home (All Notes) will be selected. The expected behavior is that the storage folder of the requested note will be selected.
Screenshot before
Screenshot after
Type of changes
Checklist: