Skip to content

Commit fde9b19

Browse files
Merge pull request #670 from MapsPeople/feature/matb/add_searchexternalid_appconfig
Feature/matb/add searchexternalid appconfig
2 parents 89b4f67 + b25f407 commit fde9b19

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/map-template/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.96.21] - 2026-03-31
9+
10+
### Fixed
11+
12+
- `searchExternalLocations` can be now also set via App Config.
13+
814
## [1.96.20] - 2026-03-27
915

1016
### Fixed

packages/map-template/src/components/MapTemplate/MapTemplate.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,8 +709,10 @@ function MapTemplate({ apiKey, gmApiKey, mapboxAccessToken, venue, locationId, p
709709
* React on changes to the searchExternalLocations prop.
710710
*/
711711
useEffect(() => {
712-
setSearchExternalLocations(searchExternalLocations);
713-
}, [searchExternalLocations]);
712+
const externalLocationsConfig = appConfig?.appSettings?.searchExternalLocations;
713+
const showExternalLocations = externalLocationsConfig !== undefined ? externalLocationsConfig === 'true' : searchExternalLocations;
714+
setSearchExternalLocations(showExternalLocations);
715+
}, [searchExternalLocations, appConfig]);
714716

715717
/*
716718
* React on changes to the center prop.

0 commit comments

Comments
 (0)