Skip to content

Commit 6930683

Browse files
authored
Merge pull request #222 from emilhe/geojson_pane_fix
Geojson pane fix
2 parents 7ab6750 + 2d02ec5 commit 6930683

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.0.14] - 11-01-24
6+
7+
### Changed
8+
9+
- Propagate pane information to GeoJSON object, thereby fixing [#221](https://github.com/emilhe/dash-leaflet/issues/221)
10+
511
## [1.0.13] - 27-12-23
612

713
### 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.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dash-leaflet",
3-
"version": "1.0.13",
3+
"version": "1.0.14",
44
"description": "Dash Leaflet is a light wrapper around React-Leaflet. The syntax is similar to other Dash components, with naming conventions following the React-Leaflet API.",
55
"main": "index.ts",
66
"repository": {

src/ts/react-leaflet/GeoJSON.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ function _parseOptions(props, map, indexRef) {
176176
return _defaultPointToLayer(feature, latlng, options)
177177
}
178178
}
179-
return options
179+
return withPane(options, context)
180180
}
181181

182182
async function _fetchGeoJSON(props) {
@@ -705,10 +705,10 @@ export const GeoJSON = createContainerComponent<L.GeoJSON, GeoJSONProps>(
705705
// Similar to "createPathHook", except that "usePathOptions" is exchanged with "useUpdateGeoJSON".
706706
(props) => {
707707
const context = useLeafletContext()
708-
const elementRef = useGeoJSON(withPane(props, context), context)
708+
const elementRef = useGeoJSON(props, context)
709709
useLayerLifecycle(elementRef.current, context)
710710
useEventHandlers(elementRef.current, props.eventHandlers)
711-
useUpdateGeoJSON(elementRef.current, props)
711+
useUpdateGeoJSON(elementRef.current, withPane(props, context))
712712
return elementRef
713713
}
714714
)

0 commit comments

Comments
 (0)