> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superdoc.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# tables.setRowOptions

> Set options on a table row such as header repeat or page break.

## Summary

Set options on a table row such as header repeat or page break.

* Operation ID: `tables.setRowOptions`
* API member path: `editor.doc.tables.setRowOptions(...)`
* Mutates document: `yes`
* Idempotency: `idempotent`
* Supports tracked mode: `no`
* Supports dry run: `yes`
* Deterministic target resolution: `yes`

## Expected result

Returns a TableMutationResult receipt; reports NO\_OP if row options already match.

## Input fields

### Variant 1 (target.nodeType="tableRow")

| Field | Type | Required | Description |
| - | - | - | - |
| `allowBreakAcrossPages` | boolean | no | |
| `gridAfter` | integer | no | |
| `gridBefore` | integer | no | |
| `repeatHeader` | boolean | no | |
| `target` | TableRowAddress | yes | TableRowAddress |
| `target.kind` | `"block"` | yes | Constant: `"block"` |
| `target.nodeId` | string | yes | |
| `target.nodeType` | `"tableRow"` | yes | Constant: `"tableRow"` |
| `wAfter` | object | no | |
| `wAfter.type` | enum | no | `"auto"`, `"dxa"`, `"nil"`, `"pct"` |
| `wAfter.value` | integer | no | |
| `wBefore` | object | no | |
| `wBefore.type` | enum | no | `"auto"`, `"dxa"`, `"nil"`, `"pct"` |
| `wBefore.value` | integer | no | |

### Variant 2 (target.nodeType="table")

| Field | Type | Required | Description |
| - | - | - | - |
| `allowBreakAcrossPages` | boolean | no | |
| `gridAfter` | integer | no | |
| `gridBefore` | integer | no | |
| `repeatHeader` | boolean | no | |
| `rowIndex` | integer | yes | |
| `target` | TableAddress | yes | TableAddress |
| `target.kind` | `"block"` | yes | Constant: `"block"` |
| `target.nodeId` | string | yes | |
| `target.nodeType` | `"table"` | yes | Constant: `"table"` |
| `wAfter` | object | no | |
| `wAfter.type` | enum | no | `"auto"`, `"dxa"`, `"nil"`, `"pct"` |
| `wAfter.value` | integer | no | |
| `wBefore` | object | no | |
| `wBefore.type` | enum | no | `"auto"`, `"dxa"`, `"nil"`, `"pct"` |
| `wBefore.value` | integer | no | |

### Variant 3 (required: nodeId, rowIndex)

| Field | Type | Required | Description |
| - | - | - | - |
| `allowBreakAcrossPages` | boolean | no | |
| `gridAfter` | integer | no | |
| `gridBefore` | integer | no | |
| `nodeId` | string | yes | |
| `repeatHeader` | boolean | no | |
| `rowIndex` | integer | yes | |
| `wAfter` | object | no | |
| `wAfter.type` | enum | no | `"auto"`, `"dxa"`, `"nil"`, `"pct"` |
| `wAfter.value` | integer | no | |
| `wBefore` | object | no | |
| `wBefore.type` | enum | no | `"auto"`, `"dxa"`, `"nil"`, `"pct"` |
| `wBefore.value` | integer | no | |

### Example request

```json theme={null}
{
  "allowBreakAcrossPages": true,
  "repeatHeader": true,
  "target": {
    "kind": "block",
    "nodeId": "node-def456",
    "nodeType": "tableRow"
  }
}
```

## Output fields

### Variant 1 (success=true)

| Field | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | yes | Constant: `true` |
| `table` | TableAddress | no | TableAddress |
| `table.kind` | `"block"` | no | Constant: `"block"` |
| `table.nodeId` | string | no | |
| `table.nodeType` | `"table"` | no | Constant: `"table"` |
| `trackedChangeRefs` | EntityAddress\[] | no | |

### Variant 2 (success=false)

| Field | Type | Required | Description |
| - | - | - | - |
| `failure` | object | yes | |
| `failure.code` | enum | yes | `"NO_OP"`, `"INVALID_TARGET"`, `"TARGET_NOT_FOUND"`, `"CAPABILITY_UNAVAILABLE"` |
| `failure.details` | any | no | |
| `failure.message` | string | yes | |
| `success` | `false` | yes | Constant: `false` |

> [!TIP]
>
> When present, `result.table` is the follow-up address to reuse after this call. For non-destructive table-targeted mutations, pass `result.table.nodeId` to the next table operation instead of re-running `find()`. Destructive operations may omit `table`.

### Example response

```json theme={null}
{
  "success": true,
  "table": {
    "kind": "block",
    "nodeId": "node-def456",
    "nodeType": "table"
  },
  "trackedChangeRefs": [
    {
      "entityId": "entity-789",
      "entityType": "comment",
      "kind": "entity"
    }
  ]
}
```

## Pre-apply throws

* `TARGET_NOT_FOUND`
* `INVALID_TARGET`
* `CAPABILITY_UNAVAILABLE`

## Non-applied failure codes

* `INVALID_TARGET`
* `NO_OP`

## Raw schemas

> [accordion] Raw input schema
>
> ```json theme={null}
> {
>   "oneOf": [
>     {
>       "additionalProperties": false,
>       "properties": {
>         "allowBreakAcrossPages": {
>           "type": "boolean"
>         },
>         "gridAfter": {
>           "minimum": 0,
>           "type": "integer"
>         },
>         "gridBefore": {
>           "minimum": 0,
>           "type": "integer"
>         },
>         "repeatHeader": {
>           "type": "boolean"
>         },
>         "target": {
>           "$ref": "#/$defs/TableRowAddress"
>         },
>         "wAfter": {
>           "additionalProperties": false,
>           "properties": {
>             "type": {
>               "enum": [
>                 "auto",
>                 "dxa",
>                 "nil",
>                 "pct"
>               ]
>             },
>             "value": {
>               "minimum": 0,
>               "type": "integer"
>             }
>           },
>           "required": [
>             "value",
>             "type"
>           ],
>           "type": "object"
>         },
>         "wBefore": {
>           "additionalProperties": false,
>           "properties": {
>             "type": {
>               "enum": [
>                 "auto",
>                 "dxa",
>                 "nil",
>                 "pct"
>               ]
>             },
>             "value": {
>               "minimum": 0,
>               "type": "integer"
>             }
>           },
>           "required": [
>             "value",
>             "type"
>           ],
>           "type": "object"
>         }
>       },
>       "required": [
>         "target"
>       ],
>       "type": "object"
>     },
>     {
>       "additionalProperties": false,
>       "properties": {
>         "allowBreakAcrossPages": {
>           "type": "boolean"
>         },
>         "gridAfter": {
>           "minimum": 0,
>           "type": "integer"
>         },
>         "gridBefore": {
>           "minimum": 0,
>           "type": "integer"
>         },
>         "repeatHeader": {
>           "type": "boolean"
>         },
>         "rowIndex": {
>           "minimum": 0,
>           "type": "integer"
>         },
>         "target": {
>           "$ref": "#/$defs/TableAddress"
>         },
>         "wAfter": {
>           "additionalProperties": false,
>           "properties": {
>             "type": {
>               "enum": [
>                 "auto",
>                 "dxa",
>                 "nil",
>                 "pct"
>               ]
>             },
>             "value": {
>               "minimum": 0,
>               "type": "integer"
>             }
>           },
>           "required": [
>             "value",
>             "type"
>           ],
>           "type": "object"
>         },
>         "wBefore": {
>           "additionalProperties": false,
>           "properties": {
>             "type": {
>               "enum": [
>                 "auto",
>                 "dxa",
>                 "nil",
>                 "pct"
>               ]
>             },
>             "value": {
>               "minimum": 0,
>               "type": "integer"
>             }
>           },
>           "required": [
>             "value",
>             "type"
>           ],
>           "type": "object"
>         }
>       },
>       "required": [
>         "target",
>         "rowIndex"
>       ],
>       "type": "object"
>     },
>     {
>       "additionalProperties": false,
>       "properties": {
>         "allowBreakAcrossPages": {
>           "type": "boolean"
>         },
>         "gridAfter": {
>           "minimum": 0,
>           "type": "integer"
>         },
>         "gridBefore": {
>           "minimum": 0,
>           "type": "integer"
>         },
>         "nodeId": {
>           "type": "string"
>         },
>         "repeatHeader": {
>           "type": "boolean"
>         },
>         "rowIndex": {
>           "minimum": 0,
>           "type": "integer"
>         },
>         "wAfter": {
>           "additionalProperties": false,
>           "properties": {
>             "type": {
>               "enum": [
>                 "auto",
>                 "dxa",
>                 "nil",
>                 "pct"
>               ]
>             },
>             "value": {
>               "minimum": 0,
>               "type": "integer"
>             }
>           },
>           "required": [
>             "value",
>             "type"
>           ],
>           "type": "object"
>         },
>         "wBefore": {
>           "additionalProperties": false,
>           "properties": {
>             "type": {
>               "enum": [
>                 "auto",
>                 "dxa",
>                 "nil",
>                 "pct"
>               ]
>             },
>             "value": {
>               "minimum": 0,
>               "type": "integer"
>             }
>           },
>           "required": [
>             "value",
>             "type"
>           ],
>           "type": "object"
>         }
>       },
>       "required": [
>         "nodeId",
>         "rowIndex"
>       ],
>       "type": "object"
>     }
>   ]
> }
> ```

> [accordion] Raw output schema
>
> ```json theme={null}
> {
>   "oneOf": [
>     {
>       "additionalProperties": false,
>       "properties": {
>         "success": {
>           "const": true
>         },
>         "table": {
>           "$ref": "#/$defs/TableAddress"
>         },
>         "trackedChangeRefs": {
>           "items": {
>             "$ref": "#/$defs/EntityAddress"
>           },
>           "type": "array"
>         }
>       },
>       "required": [
>         "success"
>       ],
>       "type": "object"
>     },
>     {
>       "additionalProperties": false,
>       "properties": {
>         "failure": {
>           "additionalProperties": false,
>           "properties": {
>             "code": {
>               "enum": [
>                 "NO_OP",
>                 "INVALID_TARGET",
>                 "TARGET_NOT_FOUND",
>                 "CAPABILITY_UNAVAILABLE"
>               ]
>             },
>             "details": {},
>             "message": {
>               "type": "string"
>             }
>           },
>           "required": [
>             "code",
>             "message"
>           ],
>           "type": "object"
>         },
>         "success": {
>           "const": false
>         }
>       },
>       "required": [
>         "success",
>         "failure"
>       ],
>       "type": "object"
>     }
>   ]
> }
> ```

> [accordion] Raw success schema
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "success": {
>       "const": true
>     },
>     "table": {
>       "$ref": "#/$defs/TableAddress"
>     },
>     "trackedChangeRefs": {
>       "items": {
>         "$ref": "#/$defs/EntityAddress"
>       },
>       "type": "array"
>     }
>   },
>   "required": [
>     "success"
>   ],
>   "type": "object"
> }
> ```

> [accordion] Raw failure schema
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "failure": {
>       "additionalProperties": false,
>       "properties": {
>         "code": {
>           "enum": [
>             "NO_OP",
>             "INVALID_TARGET",
>             "TARGET_NOT_FOUND",
>             "CAPABILITY_UNAVAILABLE"
>           ]
>         },
>         "details": {},
>         "message": {
>           "type": "string"
>         }
>       },
>       "required": [
>         "code",
>         "message"
>       ],
>       "type": "object"
>     },
>     "success": {
>       "const": false
>     }
>   },
>   "required": [
>     "success",
>     "failure"
>   ],
>   "type": "object"
> }
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.