From b28f3fd9698b2c72238c21dfbfbf6ddc3bb5dcbd Mon Sep 17 00:00:00 2001 From: Xavier Mouligneau <189600+XavierM@users.noreply.github.com> Date: Wed, 1 Apr 2020 11:08:09 -0400 Subject: [PATCH] fix types --- .../siem/public/containers/case/use_get_cases.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/x-pack/legacy/plugins/siem/public/containers/case/use_get_cases.tsx b/x-pack/legacy/plugins/siem/public/containers/case/use_get_cases.tsx index cd44ee63e8cee..1cbce5af6304b 100644 --- a/x-pack/legacy/plugins/siem/public/containers/case/use_get_cases.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/case/use_get_cases.tsx @@ -35,7 +35,7 @@ export type Action = } | { type: 'FETCH_FAILURE'; payload: string } | { type: 'FETCH_UPDATE_CASE_SUCCESS' } - | { type: 'UPDATE_FILTER_OPTIONS'; payload: FilterOptions } + | { type: 'UPDATE_FILTER_OPTIONS'; payload: Partial } | { type: 'UPDATE_QUERY_PARAMS'; payload: Partial } | { type: 'UPDATE_TABLE_SELECTIONS'; payload: Case[] }; @@ -122,8 +122,8 @@ interface UseGetCases extends UseGetCasesState { refetchCasesStatus, }: UpdateCase) => void; refetchCases: (filters: FilterOptions, queryParams: QueryParams) => void; - setFilters: (filters: FilterOptions) => void; - setQueryParams: (queryParams: QueryParams) => void; + setFilters: (filters: Partial) => void; + setQueryParams: (queryParams: Partial) => void; setSelectedCases: (mySelectedCases: Case[]) => void; } @@ -142,11 +142,11 @@ export const useGetCases = (initialQueryParams?: QueryParams): UseGetCases => { dispatch({ type: 'UPDATE_TABLE_SELECTIONS', payload: mySelectedCases }); }, []); - const setQueryParams = useCallback((newQueryParams: QueryParams) => { + const setQueryParams = useCallback((newQueryParams: Partial) => { dispatch({ type: 'UPDATE_QUERY_PARAMS', payload: newQueryParams }); }, []); - const setFilters = useCallback((newFilters: FilterOptions) => { + const setFilters = useCallback((newFilters: Partial) => { dispatch({ type: 'UPDATE_FILTER_OPTIONS', payload: newFilters }); }, []);