Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8c04781

Browse filesBrowse files
fix: fixing to accomodate when no category is inserted
(cherry picked from commit c050725)
1 parent ea7f44c commit 8c04781
Copy full SHA for 8c04781

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed

‎shesha-reactjs/src/providers/notes/index.tsx

Copy file name to clipboardExpand all lines: shesha-reactjs/src/providers/notes/index.tsx
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const NotesProvider: FC<PropsWithChildren<INoteSettings>> = ({
3838
const [state, dispatch] = useReducer(notesReducer, COMMENTS_CONTEXT_INITIAL_STATE);
3939

4040
const { connection } = useSignalR(false) ?? {};
41+
const shouldShowAllCategories = !category || allCategories;
4142

4243
//#region Register signal r events
4344
useEffect(() => {
@@ -56,7 +57,7 @@ const NotesProvider: FC<PropsWithChildren<INoteSettings>> = ({
5657
//#endregion
5758

5859
useEffect(() => {
59-
dispatch(setSettingsAction({ ownerId, ownerType, category, allCategories }));
60+
dispatch(setSettingsAction({ ownerId, ownerType, category, allCategories: shouldShowAllCategories }));
6061
}, [ownerId, ownerType, category, allCategories]);
6162

6263
//#region Fetch notes
@@ -66,7 +67,7 @@ const NotesProvider: FC<PropsWithChildren<INoteSettings>> = ({
6667
data,
6768
error: fetchNotesResError,
6869
} = useNoteGetList({
69-
queryParams: { ownerId, ownerType, category, allCategories },
70+
queryParams: { ownerId, ownerType, category, allCategories: shouldShowAllCategories },
7071
lazy: true,
7172
});
7273

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.