diff --git a/package-lock.json b/package-lock.json index 534053b61..dae02541a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25841,7 +25841,7 @@ }, "packages/map-template": { "name": "@mapsindoors/map-template", - "version": "1.96.19", + "version": "1.96.20", "dependencies": { "@mapsindoors/components": "*", "@mapsindoors/css": "^3.0.0", diff --git a/packages/map-template/CHANGELOG.md b/packages/map-template/CHANGELOG.md index 3d776cac6..e7c9ffee2 100644 --- a/packages/map-template/CHANGELOG.md +++ b/packages/map-template/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.96.21] - 2026-03-31 + +### Fixed + +- `searchExternalLocations` can be now also set via App Config. + ## [1.96.20] - 2026-03-27 ### Fixed diff --git a/packages/map-template/src/components/MapTemplate/MapTemplate.jsx b/packages/map-template/src/components/MapTemplate/MapTemplate.jsx index d5b7c1d93..0e4c066e3 100644 --- a/packages/map-template/src/components/MapTemplate/MapTemplate.jsx +++ b/packages/map-template/src/components/MapTemplate/MapTemplate.jsx @@ -709,8 +709,10 @@ function MapTemplate({ apiKey, gmApiKey, mapboxAccessToken, venue, locationId, p * React on changes to the searchExternalLocations prop. */ useEffect(() => { - setSearchExternalLocations(searchExternalLocations); - }, [searchExternalLocations]); + const externalLocationsConfig = appConfig?.appSettings?.searchExternalLocations; + const showExternalLocations = externalLocationsConfig !== undefined ? externalLocationsConfig === 'true' : searchExternalLocations; + setSearchExternalLocations(showExternalLocations); + }, [searchExternalLocations, appConfig]); /* * React on changes to the center prop.