MosaicWindowActions
react-mosaic-component / MosaicWindowActions
Interface: MosaicWindowActions
Defined in: libs/react-mosaic-component/src/lib/contextTypes.ts:106
Properties
addTab
addTab: (...
args) =>Promise<void>
Defined in: libs/react-mosaic-component/src/lib/contextTypes.ts:118
Creates a new tab node and replaces the current node. The current node becomes the first tab and the new node the second tab of the result.
Parameters
args
...any[]
Returns
Promise<void>
connectDragSource
connectDragSource: (
connectedElements) =>ReactElement<unknown,string|JSXElementConstructor<any>> |null
Defined in: libs/react-mosaic-component/src/lib/contextTypes.ts:140
Enables connecting a different drag source besides the react-mosaic toolbar
Parameters
connectedElements
ReactElement<any>
Returns
ReactElement<unknown, string | JSXElementConstructor<any>> | null
getPath
getPath: () =>
MosaicPath
Defined in: libs/react-mosaic-component/src/lib/contextTypes.ts:136
Returns the path to this window
Returns
getRoot
getRoot: () =>
MosaicNode<MosaicKey> |null
Defined in: libs/react-mosaic-component/src/lib/contextTypes.ts:122
Returns the root of this Mosaic instance
Returns
MosaicNode<MosaicKey> | null
replaceWithNew
replaceWithNew: (...
args) =>Promise<void>
Defined in: libs/react-mosaic-component/src/lib/contextTypes.ts:127
Fails if no createNode() is defined
Convenience function to call createNode() and replace the current node with it.
Parameters
args
...any[]
Returns
Promise<void>
setAdditionalControlsOpen
setAdditionalControlsOpen: (
open) =>void
Defined in: libs/react-mosaic-component/src/lib/contextTypes.ts:132
Sets the open state for the tray that holds additional controls. Pass 'toggle' to invert the current state.
Parameters
open
boolean | "toggle"
Returns
void
split
split: (...
args) =>Promise<void>
Defined in: libs/react-mosaic-component/src/lib/contextTypes.ts:113
Fails if no createNode() is defined
Creates a new node and splits the current node.
The current node becomes the first and the new node the second of the result.
direction is chosen by querying the DOM and splitting along the longer axis
Parameters
args
...any[]
Returns
Promise<void>