Fix cantSplit documentation

This commit is contained in:
Dolan
2020-10-24 20:24:10 +01:00
parent d445c21ea1
commit ea5f9a48ab

View File

@ -51,19 +51,6 @@ const table = new Table({
}); });
``` ```
### Pagination
#### Prevent row pagination
To prevent breaking contents of a row across multiple pages, call `cantSplit`:
```ts
const table = new Table({
rows: [],
cantSplit: true,
});
```
## Table Row ## Table Row
A table consists of multiple `table rows`. Table rows have a list of `children` which accepts a list of `table cells` explained below. You can create a simple `table row` like so: A table consists of multiple `table rows`. Table rows have a list of `children` which accepts a list of `table cells` explained below. You can create a simple `table row` like so:
@ -116,6 +103,19 @@ const row = new TableRow({
}); });
``` ```
### Pagination
#### Prevent row pagination
To prevent breaking contents of a row across multiple pages, call `cantSplit`:
```ts
const row = new Row({
...,
cantSplit: true,
});
```
## Table Cells ## Table Cells
Cells need to be added in the `table row`, you can create a table cell like: Cells need to be added in the `table row`, you can create a table cell like: