mirror of
https://github.com/visgl/react-map-gl.git
synced 2026-01-25 16:02:50 +00:00
Inherit parent height inmapboxgl-children div (#2132)
This commit is contained in:
parent
074a4094b1
commit
86efdc0433
@ -151,11 +151,17 @@ const Map = forwardRef<MapRef, MapProps>((props, ref) => {
|
||||
[props.style]
|
||||
);
|
||||
|
||||
const CHILD_CONTAINER_STYLE = {
|
||||
height: '100%'
|
||||
};
|
||||
|
||||
return (
|
||||
<div id={props.id} ref={containerRef} style={style}>
|
||||
{mapInstance && (
|
||||
<MapContext.Provider value={contextValue}>
|
||||
<div mapboxgl-children="">{props.children}</div>
|
||||
<div mapboxgl-children="" style={CHILD_CONTAINER_STYLE}>
|
||||
{props.children}
|
||||
</div>
|
||||
</MapContext.Provider>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user