Skip to content
Snippets Groups Projects
Commit 5e26bf4c authored by BrittainJackson7's avatar BrittainJackson7
Browse files

Fix bug that transfers queryable selections across collections

parent 8bb730b4
Branches
No related tags found
No related merge requests found
......@@ -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]) {
......@@ -219,6 +222,7 @@ export default function FootprintResults(props) {
// Send to Leaflet
window.postMessage(["setFeatureCollections", myId, collections], "*");
})();
......
......@@ -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]);
......
......@@ -82,6 +82,7 @@ export default function Sidebar(props) {
setQueryAddress={props.setQueryAddress}
updateSelectedTitle={updateSelectedTitle}
selectedQueryables = {updatedQueryableTitles}
UpdateQueryableTitles = {UpdateQueryableTitles}
/>
</Collapse>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment