File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Filter options
shesha-reactjs/src/providers/notes Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ const NotesProvider: FC<PropsWithChildren<INoteSettings>> = ({
38
38
const [ state , dispatch ] = useReducer ( notesReducer , COMMENTS_CONTEXT_INITIAL_STATE ) ;
39
39
40
40
const { connection } = useSignalR ( false ) ?? { } ;
41
+ const shouldShowAllCategories = ! category || allCategories ;
41
42
42
43
//#region Register signal r events
43
44
useEffect ( ( ) => {
@@ -56,7 +57,7 @@ const NotesProvider: FC<PropsWithChildren<INoteSettings>> = ({
56
57
//#endregion
57
58
58
59
useEffect ( ( ) => {
59
- dispatch ( setSettingsAction ( { ownerId, ownerType, category, allCategories } ) ) ;
60
+ dispatch ( setSettingsAction ( { ownerId, ownerType, category, allCategories : shouldShowAllCategories } ) ) ;
60
61
} , [ ownerId , ownerType , category , allCategories ] ) ;
61
62
62
63
//#region Fetch notes
@@ -66,7 +67,7 @@ const NotesProvider: FC<PropsWithChildren<INoteSettings>> = ({
66
67
data,
67
68
error : fetchNotesResError ,
68
69
} = useNoteGetList ( {
69
- queryParams : { ownerId, ownerType, category, allCategories } ,
70
+ queryParams : { ownerId, ownerType, category, allCategories : shouldShowAllCategories } ,
70
71
lazy : true ,
71
72
} ) ;
72
73
You can’t perform that action at this time.
0 commit comments