diff --git a/src/containers/Collection/CollectionList/CollectionList.tsx b/src/containers/Collection/CollectionList/CollectionList.tsx index 40ffe98fd..9e026efc1 100644 --- a/src/containers/Collection/CollectionList/CollectionList.tsx +++ b/src/containers/Collection/CollectionList/CollectionList.tsx @@ -53,6 +53,7 @@ const columnAttributes = { }; export const CollectionList = () => { + const [updateCollection, setUpdateCollection] = useState(false); const [addContactsDialogShow, setAddContactsDialogShow] = useState(false); const [contactSearchTerm, setContactSearchTerm] = useState(''); @@ -95,6 +96,7 @@ export const CollectionList = () => { } else { setNotification(`${numberAdded} contact${numberAdded === 1 ? '' : 's were'} added`); } + setUpdateCollection((updateCollection) => !updateCollection); setAddContactsDialogShow(false); }, refetchQueries: [{ query: GET_COLLECTION_CONTACTS, variables: { id: collectionId } }], @@ -218,6 +220,7 @@ export const CollectionList = () => { )} { secondaryButton={importButton} filters={filters} filterList={activeFilter} - filtersTag={selectedtag && selectedtag.id} filterDropdowm={tagFilter} /> ); diff --git a/src/containers/List/List.tsx b/src/containers/List/List.tsx index ff2a25b93..6063cc4ec 100644 --- a/src/containers/List/List.tsx +++ b/src/containers/List/List.tsx @@ -52,7 +52,6 @@ export interface ListProps { }; searchParameter?: Array; filters?: Object | null; - filtersTag?: any; filterList?: any; filterDropdowm?: any; displayListType?: string; @@ -82,6 +81,7 @@ export interface ListProps { defaultSortBy?: string | null; noItemText?: string | null; customStyles?: any; + refreshList?: boolean; } interface TableVals { @@ -116,7 +116,7 @@ export const List = ({ editSupport = true, searchParameter = ['label'], filters = null, - filtersTag = null, + refreshList = false, displayListType = 'list', cardLink = null, additionalAction = () => [], @@ -268,7 +268,7 @@ export const List = ({ useEffect(() => { refetchValues(); refetchCount(); - }, [searchVal, filters]); + }, [searchVal, filters, refreshList]); useEffect(() => { if (userRole.length === 0) {