File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/components/ChannelList/hooks Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 11// @ts -check
22
3- import { useEffect , useState } from 'react' ;
3+ import { useEffect , useMemo , useState } from 'react' ;
44import { MAX_QUERY_CHANNELS_LIMIT } from '../utils' ;
55/**
66 * @typedef {import('stream-chat').Channel } Channel
@@ -24,6 +24,8 @@ export const usePaginatedChannels = (
2424 const [ error , setError ] = useState ( false ) ;
2525 const [ hasNextPage , setHasNextPage ] = useState ( true ) ;
2626
27+ const filterString = useMemo ( ( ) => JSON . stringify ( filters ) , [ filters ] ) ;
28+
2729 /**
2830 * @param {string } [queryType]
2931 */
@@ -78,7 +80,7 @@ export const usePaginatedChannels = (
7880 useEffect ( ( ) => {
7981 queryChannels ( 'reload' ) ;
8082 // eslint-disable-next-line react-hooks/exhaustive-deps
81- } , [ filters ] ) ;
83+ } , [ filterString ] ) ;
8284
8385 return {
8486 channels,
You can’t perform that action at this time.
0 commit comments