Working on email templating, updating with swagger
This commit is contained in:
@@ -20,7 +20,7 @@ export function CustomControl({ position = 'bottomright', onClick, active = fals
|
||||
const ctrl = new L.Control({ position });
|
||||
ctrl.onAdd = () => {
|
||||
return L.DomUtil.create('div', 'leaflet-bar leaflet-control custom-control');
|
||||
}
|
||||
};
|
||||
|
||||
ctrl.addTo(map);
|
||||
controlRef.current = ctrl;
|
||||
@@ -28,6 +28,7 @@ export function CustomControl({ position = 'bottomright', onClick, active = fals
|
||||
// @ts-expect-error ctrl is a L.Control
|
||||
const container = (ctrl as unknown)._container as HTMLElement;
|
||||
rootRef.current = createRoot(container);
|
||||
L.DomEvent.disableClickPropagation(container);
|
||||
|
||||
return () => {
|
||||
if (rootRef.current) {
|
||||
@@ -45,7 +46,7 @@ export function CustomControl({ position = 'bottomright', onClick, active = fals
|
||||
href={'#'}
|
||||
title={title}
|
||||
className={active ? 'active' : ''}
|
||||
onClick={e => {
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
onClick();
|
||||
@@ -59,7 +60,7 @@ export function CustomControl({ position = 'bottomright', onClick, active = fals
|
||||
>
|
||||
{children}
|
||||
</a>
|
||||
)
|
||||
);
|
||||
}
|
||||
}, [onClick, active, title, children]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user