From 88fc8fa3f880e52d0010cd07c7364662bc6e8832 Mon Sep 17 00:00:00 2001 From: "Dan \"Ducky\" Little" Date: Thu, 7 Nov 2024 15:57:40 -0600 Subject: [PATCH] Ensure bufferResults honors filtered results --- src/gm3/actions/query.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gm3/actions/query.js b/src/gm3/actions/query.js index be090518..ad4080e8 100644 --- a/src/gm3/actions/query.js +++ b/src/gm3/actions/query.js @@ -5,6 +5,7 @@ import { vectorFeatureQuery } from "../query/vector"; import { wfsGetFeatureQuery } from "../query/wfs"; import { wmsGetFeatureInfoQuery } from "../query/wms"; import { getMapSourceName } from "../util"; +import { getQueryResults } from "../selectors/query"; import { changeTool, @@ -152,13 +153,14 @@ export const bufferResults = createAsyncThunk( "query/buffer-results", (arg, { getState, dispatch }) => { const state = getState(); - const query = state.query; + const results = getQueryResults(state); + console.log("RESULTS=", results); // flatten the query results down to just a // list of features let features = []; - for (const path in query.results) { - features = features.concat(query.results[path]); + for (const path in results) { + features = features.concat(results[path]); } if (features.length > 0) {