diff --git a/src/MosaicWindow.tsx b/src/MosaicWindow.tsx index ba5e503..5ab6b9a 100644 --- a/src/MosaicWindow.tsx +++ b/src/MosaicWindow.tsx @@ -32,6 +32,7 @@ export interface MosaicWindowProps { toolbarControls?: React.ReactNode; additionalControls?: React.ReactNode; additionalControlButtonText?: string; + onAdditionalControlsToggle?: (toggle: boolean) => void; draggable?: boolean; createNode?: CreateNode; renderPreview?: (props: MosaicWindowProps) => JSX.Element; @@ -222,6 +223,7 @@ export class InternalMosaicWindow extends React.Component< private setAdditionalControlsOpen = (additionalControlsOpen: boolean) => { this.setState({ additionalControlsOpen }); + this.props.onAdditionalControlsToggle?.(additionalControlsOpen); }; private getPath = () => this.props.path;