import { useContext } from 'react' ; import ListFilterContext , { ListFilterContextValue } from './ListFilterContext' ; typedef ListFilterContextValue prop { Object } filterValues prop { Function } setFilters prop { Object } displayedFilters prop { Function } showFilter prop { Function } hideFilter prop { string } resource returns { ListFilterContextValue } see useListController const useListFilterContext = ( props ? ) : ListFilterContextValue => { const context = useContext ( ListFilterContext ) ; if ( ! context . hideFilter ) { deprecated if ( process . env . NODE_ENV !== 'production' ) { console . log ( "List components must be used inside a <ListContextProvider>. Relying on props rather than context to get List data and callbacks is deprecated and won't be supported in the next major version of react-admin." ) ; } return props ; } return context ; } ; export default useListFilterContext ;