Inherit parent height inmapboxgl-children div (#2132)

This commit is contained in:
Martin Petrov 2023-04-11 20:42:26 +03:00 committed by GitHub
parent 074a4094b1
commit 86efdc0433
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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>