Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop: Focus is lost and notebook disappears (laurent22#10194) #10222

Closed
wants to merge 6 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions packages/app-desktop/gui/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ interface Props {
notesParentType: string;
selectedFolderId: string;
selectedTagId: string;
selectedSmartFilterId: string;
selectedSmartFilterId: string; // used by SmartFilter parent types
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
decryptionWorker: any;
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
Expand Down Expand Up @@ -490,8 +490,7 @@ const SidebarComponent = (props: Props) => {
type: 'SMART_FILTER_SELECT',
id: ALL_NOTES_FILTER_ID,
});
folderItem_click(ALL_NOTES_FILTER_ID);
}, [props.dispatch, folderItem_click]);
}, [props.dispatch]);

const anchorItemRef = (type: string, id: string) => {
if (!anchorItemRefs.current[type]) anchorItemRefs.current[type] = {};
Expand Down Expand Up @@ -768,7 +767,7 @@ const SidebarComponent = (props: Props) => {


if (props.folders.length) {
const allNotesSelected = props.selectedFolderId === ALL_NOTES_FILTER_ID;
const allNotesSelected = props.notesParentType === 'SmartFilter' && props.selectedSmartFilterId === ALL_NOTES_FILTER_ID;
const result = renderFolders(props, renderFolderItem);
const folderItems = [renderAllNotesItem(theme, allNotesSelected)].concat(result.items);
folderItemsOrder_.current = result.order;
Expand Down
Loading