# Row

**Kind**: interface | **Module**: [Workspaces](https://docs.interop.io/desktop/reference/javascript/workspaces/index.md)

**Source**: https://docs.interop.io/desktop/reference/javascript/workspaces/row/index.html

An object describing a row type workspace box

## Properties

- **`allowDrop`** (`boolean`, optional)
  Indicates if dropping windows inside this box is allowed
- **`allowSplitters`** (`boolean`, optional)
  Indicates if dragging of splitters is allowed in the row
- **`children`** (`WorkspaceElement[]`, required)
  A collection containing the immediate children of this box
- **`frame`** (`Frame`, required)
  An object representing the frame containing this box
- **`frameId`** (`string`, required)
  The unique string identifier of the frame containing this box
- **`height`** (`number`, optional)
  Returns the current height of the box, can be undefined if the API is used with old versions of Enterprise or Core
- **`id`** (`string`, required)
  An unique string identifier of this box
- **`isMaximized`** (`boolean`, optional)
  Returns whether or not the box is maximized
- **`isPinned`** (`boolean`, optional)
  Indicates whether or not the row is pinned
- **`maxHeight`** (`number`, optional)
  Returns the maximum height of the box, calculated by the size constraints of the elements inside it
- **`maximizationBoundary`** (`boolean`, optional)
  If set to true any child that is maximized will have its width and height constricted to the current element's size
- **`maxWidth`** (`number`, optional)
  Returns the maximum width of the box, calculated by the size constraints of the elements inside it
- **`minHeight`** (`number`, optional)
  Returns the minimum height of the box, calculated by the size constraints of the elements inside it
- **`minWidth`** (`number`, optional)
  Returns the minimum width of the box, calculated by the size constraints of the elements inside it
- **`parent`** (`Workspace | WorkspaceBox`, required)
  An object representing this box's parent
- **`positionIndex`** (`number`, required)
  An number representing the positing of this box relative to it's siblings
- **`type`** (`"row"`, required)
- **`width`** (`number`, optional)
  Returns the current width of the box, can be undefined if the API is used with old versions of Enterprise or Core
- **`workspace`** (`Workspace`, required)
  An object representing the workspace containing this box
- **`workspaceId`** (`string`, required)
  The unique string identifier of the workspace containing this box

## Methods

### addColumn

Adds a new column box to this box.

```ts
(definition?: BoxDefinition | BoxBuilder) => Promise<Column>
```

**Parameters**

- **`definition`** (`BoxDefinition | BoxBuilder`, optional)
  An object describing the type of the requested builder, alongside other settings.

**Returns**: `Promise<Column>`

### addGroup

Adds a new group box to this box.

```ts
(definition?: BoxDefinition | BoxBuilder) => Promise<Group>
```

**Parameters**

- **`definition`** (`BoxDefinition | BoxBuilder`, optional)
  An object describing the type of the requested builder, alongside other settings.

**Returns**: `Promise<Group>`

### addRow

Adds a new row box to this box.

```ts
(definition?: BoxDefinition | BoxBuilder) => Promise<Row>
```

**Parameters**

- **`definition`** (`BoxDefinition | BoxBuilder`, optional)
  An object describing the type of the requested builder, alongside other settings.

**Returns**: `Promise<Row>`

### addWindow

Opens a new window inside this box and loads it's content.

```ts
(definition: WorkspaceWindowDefinition) => Promise<WorkspaceWindow>
```

**Parameters**

- **`definition`** (`WorkspaceWindowDefinition`, required)
  An object describing the requested window.

**Returns**: `Promise<WorkspaceWindow>`

### close

Closes this box all of it's children.

```ts
() => Promise<void>
```

**Returns**: `Promise<void>`

### lock

Locks the row using a provided config object, which restricts various modification functionalities of the row

```ts
(config?: RowLockConfig | ((config: RowLockConfig) => RowLockConfig)) => Promise<void>
```

**Parameters**

- **`config`** (`RowLockConfig | ((config: RowLockConfig) => RowLockConfig)`, optional)
  This can be either an object or a function. When the object is provided, it overrides all other lock properties. When a function is provided, it will be called with the current lock settings and it should return a lock config, which will override the current settings. The function is recommended in all cases where overriding of the settings is not desired.

**Returns**: `Promise<void>`

### maximize

Maximizes this box relative to it's parent box.

```ts
() => Promise<void>
```

**Returns**: `Promise<void>`

### onLockConfigurationChanged

Notifies when the a change in the lock configuration of the row has been made

```ts
(callback: (config: IOConnectWorkspaces.RowLockConfig) => void) => Promise<IOConnectWorkspaces.Unsubscribe>
```

**Parameters**

- **`callback`** (`(config: IOConnectWorkspaces.RowLockConfig) => void`, required)
  Callback function to handle the event. Receives the new lock configuration as a parameter

**Returns**: `Promise<IOConnectWorkspaces.Unsubscribe>`

### removeChild

Removes the first immediate child of this box which satisfies the predicate.

```ts
(predicate: (child: WorkspaceElement) => boolean) => Promise<void>
```

**Parameters**

- **`predicate`** (`(child: WorkspaceElement) => boolean`, required)
  A filtering function (predicate) called for immediate child of this box.

**Returns**: `Promise<void>`

### restore

Restores this box, if previously maximized.

```ts
() => Promise<void>
```

**Returns**: `Promise<void>`

### setHeight

Sets a new height for the row

```ts
(height: number) => Promise<void>
```

**Parameters**

- **`height`** (`number`, required)
  A required number which should be the new height of the row

**Returns**: `Promise<void>`

### setMaximizationBoundary

Changes whether the row is a maximizationBoundary

```ts
(config: SetMaximizationBoundaryConfig) => Promise<void>
```

**Parameters**

- **`config`** (`SetMaximizationBoundaryConfig`, required)
  Object which specifies how the maximizationBoundary behavior should be changed

**Returns**: `Promise<void>`

## Related types

- [BoxBuilder](https://docs.interop.io/desktop/reference/javascript/workspaces/boxbuilder/index.md)
- [BoxDefinition](https://docs.interop.io/desktop/reference/javascript/workspaces/boxdefinition/index.md)
- [Column](https://docs.interop.io/desktop/reference/javascript/workspaces/column/index.md)
- [Frame](https://docs.interop.io/desktop/reference/javascript/workspaces/frame/index.md)
- [Group](https://docs.interop.io/desktop/reference/javascript/workspaces/group/index.md)
- [RowLockConfig](https://docs.interop.io/desktop/reference/javascript/workspaces/rowlockconfig/index.md)
- [SetMaximizationBoundaryConfig](https://docs.interop.io/desktop/reference/javascript/workspaces/setmaximizationboundaryconfig/index.md)
- [Unsubscribe](https://docs.interop.io/desktop/reference/javascript/workspaces/unsubscribe/index.md)
- [Workspace](https://docs.interop.io/desktop/reference/javascript/workspaces/workspace/index.md)
- [WorkspaceBox](https://docs.interop.io/desktop/reference/javascript/workspaces/workspacebox/index.md)
- [WorkspaceElement](https://docs.interop.io/desktop/reference/javascript/workspaces/workspaceelement/index.md)
- [WorkspaceWindow](https://docs.interop.io/desktop/reference/javascript/workspaces/workspacewindow/index.md)
- [WorkspaceWindowDefinition](https://docs.interop.io/desktop/reference/javascript/workspaces/workspacewindowdefinition/index.md)
