Skip to content

Commit

Permalink
Use the query.serviceName instead of serviceName for highlight
Browse files Browse the repository at this point in the history
This prevents features from being highlighted based on the _started_
service intsead of the _rendered_ service.
  • Loading branch information
theduckylittle committed Nov 7, 2024
1 parent 1912bfd commit 2d61597
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gm3/selectors/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { getLayerFromPath } from "../actions/mapSource";
export const getAllResults = (state) => state.query.results;
export const getFilter = (state) => state.query.filter;
export const getServiceName = (state) => state.query.serviceName;
export const getQueryServiceName = (state) =>
state.query.query ? state.query.query.serviceName : "";
export const getHotFilter = (state) => state.query.hotFilter;

// TODO: Move this to a map sources selector
Expand Down Expand Up @@ -36,7 +38,7 @@ export const getFlatResults = createSelector(getAllResults, (results) => {
export const getHighlightResults = createSelector(
getAllResults,
getFilter,
getServiceName,
getQueryServiceName,
getMapSources,
getHotFilter,
(results, filter, serviceName, mapSources, hotFilter) => {
Expand Down

0 comments on commit 2d61597

Please sign in to comment.