diff --git a/src/components/presentational/FootprintResults.jsx b/src/components/presentational/FootprintResults.jsx index 60b4ec3176c9c5941c122929958d7ef0196a1347..0cad69dfc327314ad31d0dbee6630d15bfb66fc4 100644 --- a/src/components/presentational/FootprintResults.jsx +++ b/src/components/presentational/FootprintResults.jsx @@ -68,6 +68,8 @@ export default function FootprintResults(props) { // Call the callback function to pass the selected title to the Sidebar props.updateSelectedTitle(selectedCollectionTitle); + props.UpdateQueryableTitles(null); + // Send to Leaflet window.postMessage(["setVisibleCollections", newCollectionId], "*"); @@ -203,6 +205,7 @@ export default function FootprintResults(props) { } + // Updates collectionId if switching to a new set of collections (new target) let myId = collectionId; if (!collections[myId]) { @@ -217,6 +220,7 @@ export default function FootprintResults(props) { setHasFootprints(Object.keys(collections).length > 0); setIsLoading(false); + // Send to Leaflet diff --git a/src/components/presentational/SearchAndFilterInput.jsx b/src/components/presentational/SearchAndFilterInput.jsx index ceec8f7c3c0c81300de7e7ded8ef4f93927876be..2a27c72569af4882b53ee7ea583922ca24d793b4 100644 --- a/src/components/presentational/SearchAndFilterInput.jsx +++ b/src/components/presentational/SearchAndFilterInput.jsx @@ -227,6 +227,10 @@ export default function SearchAndFilterInput(props) { UpdateQueryableTitles(selectedOptionsWithValues); }; + //queryables + const handleQueryableRemove = (event) => { + UpdateQueryableTitles(event); + }; // Sorting const handleSortChange = (event) => { @@ -296,6 +300,8 @@ export default function SearchAndFilterInput(props) { setAreaTextVal(""); // Area (received by window message from AstroMap) setDateFromVal(null); // From Date setDateToVal(null); // To Date + handleQueryableRemove(null); // properties selection + }, [props.targetName]); diff --git a/src/components/presentational/Sidebar.jsx b/src/components/presentational/Sidebar.jsx index d362dd990d6396d2b4ac2178b525ce9d41b1113d..6e26f8346724845b3f44642687360e008413e166 100644 --- a/src/components/presentational/Sidebar.jsx +++ b/src/components/presentational/Sidebar.jsx @@ -80,8 +80,9 @@ export default function Sidebar(props) { filterString={filterString} queryAddress={props.queryAddress} setQueryAddress={props.setQueryAddress} - updateSelectedTitle={updateSelectedTitle} + updateSelectedTitle={updateSelectedTitle} selectedQueryables = {updatedQueryableTitles} + UpdateQueryableTitles = {UpdateQueryableTitles} /> </Collapse> </div>