Skip to content

Commit

Permalink
Update the behaviour when a nested table is used. There is now an exp…
Browse files Browse the repository at this point in the history
…licit flag that should be set on a nested table, this allows the correct top border handling to occur
  • Loading branch information
David Kucsai committed Feb 12, 2022
1 parent ddcba28 commit 311c211
Show file tree
Hide file tree
Showing 34 changed files with 122 additions and 95 deletions.
2 changes: 1 addition & 1 deletion docs/iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -345,4 +345,4 @@



window['STORIES'] = [];</script><script src="runtime~main.89de9395.iframe.bundle.js"></script><script src="vendors~main.6d5afb8e.iframe.bundle.js"></script><script src="main.dfdc807a.iframe.bundle.js"></script></body></html>
window['STORIES'] = [];</script><script src="runtime~main.89de9395.iframe.bundle.js"></script><script src="vendors~main.6d5afb8e.iframe.bundle.js"></script><script src="main.8468ed23.iframe.bundle.js"></script></body></html>
1 change: 1 addition & 0 deletions docs/main.8468ed23.iframe.bundle.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/main.dfdc807a.iframe.bundle.js

This file was deleted.

2 changes: 1 addition & 1 deletion docs/typedoc/classes/DataTableCell.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ React.PureComponent.render

#### Defined in

[src/DataTableCell.tsx:21](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/DataTableCell.tsx#L21)
[src/DataTableCell.tsx:21](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/DataTableCell.tsx#L21)
2 changes: 1 addition & 1 deletion docs/typedoc/classes/Table.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ React.PureComponent.render

#### Defined in

[src/Table.tsx:34](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/Table.tsx#L34)
[src/Table.tsx:40](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/Table.tsx#L40)
2 changes: 1 addition & 1 deletion docs/typedoc/classes/TableBody.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ React.PureComponent.render

#### Defined in

[src/TableBody.tsx:22](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableBody.tsx#L22)
[src/TableBody.tsx:23](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableBody.tsx#L23)
2 changes: 1 addition & 1 deletion docs/typedoc/classes/TableCell.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ React.PureComponent.render

#### Defined in

[src/TableCell.tsx:63](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L63)
[src/TableCell.tsx:63](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L63)
2 changes: 1 addition & 1 deletion docs/typedoc/classes/TableHeader.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ React.PureComponent.render

#### Defined in

[src/TableHeader.tsx:12](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableHeader.tsx#L12)
[src/TableHeader.tsx:12](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableHeader.tsx#L12)
22 changes: 11 additions & 11 deletions docs/typedoc/interfaces/DataTableCellProps.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The data associated with the cell.

#### Defined in

[src/DataTableCell.tsx:8](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/DataTableCell.tsx#L8)
[src/DataTableCell.tsx:8](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/DataTableCell.tsx#L8)

___

Expand All @@ -53,7 +53,7 @@ The font-size to apply to the cell.

#### Defined in

[src/TableCell.tsx:56](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L56)
[src/TableCell.tsx:56](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L56)

___

Expand All @@ -69,7 +69,7 @@ Include the bottom border. Default true.

#### Defined in

[src/TableCell.tsx:23](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L23)
[src/TableCell.tsx:23](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L23)

___

Expand All @@ -85,7 +85,7 @@ Include the left border. Default true.

#### Defined in

[src/TableCell.tsx:28](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L28)
[src/TableCell.tsx:28](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L28)

___

Expand All @@ -101,7 +101,7 @@ Include the right border. Default true.

#### Defined in

[src/TableCell.tsx:18](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L18)
[src/TableCell.tsx:18](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L18)

___

Expand All @@ -117,7 +117,7 @@ Include the top border. Default true.

#### Defined in

[src/TableCell.tsx:13](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L13)
[src/TableCell.tsx:13](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L13)

___

Expand All @@ -133,7 +133,7 @@ Whether this is a header cell or not. If not defined it will be false.

#### Defined in

[src/TableCell.tsx:51](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L51)
[src/TableCell.tsx:51](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L51)

___

Expand All @@ -149,7 +149,7 @@ Extra styling to apply. These will override existing style with the same key.

#### Defined in

[src/TableCell.tsx:41](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L41)
[src/TableCell.tsx:41](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L41)

___

Expand All @@ -165,7 +165,7 @@ How to align the text

#### Defined in

[src/TableCell.tsx:46](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L46)
[src/TableCell.tsx:46](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L46)

___

Expand All @@ -182,7 +182,7 @@ This value is between 0..1, if not specified 1 is assumed, this will take up the

#### Defined in

[src/TableCell.tsx:36](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L36)
[src/TableCell.tsx:36](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L36)

## Methods

Expand All @@ -204,4 +204,4 @@ The content to display for this cell.

#### Defined in

[src/DataTableCell.tsx:14](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/DataTableCell.tsx#L14)
[src/DataTableCell.tsx:14](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/DataTableCell.tsx#L14)
27 changes: 15 additions & 12 deletions docs/typedoc/interfaces/TableBodyProps.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ TableRowProps.data

#### Defined in

[src/TableBody.tsx:10](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableBody.tsx#L10)
[src/TableBody.tsx:10](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableBody.tsx#L10)

___

Expand All @@ -57,7 +57,7 @@ TableRowProps.even

#### Defined in

[src/TableRow.tsx:32](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableRow.tsx#L32)
[src/TableRow.tsx:32](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableRow.tsx#L32)

___

Expand All @@ -73,7 +73,7 @@ TableRowProps.evenRowColor

#### Defined in

[src/TableRow.tsx:37](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableRow.tsx#L37)
[src/TableRow.tsx:37](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableRow.tsx#L37)

___

Expand All @@ -89,7 +89,7 @@ TableRowProps.fontSize

#### Defined in

[src/TableRow.tsx:12](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableRow.tsx#L12)
[src/TableRow.tsx:12](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableRow.tsx#L12)

___

Expand All @@ -105,7 +105,7 @@ TableRowProps.includeBottomBorder

#### Defined in

[src/TableCell.tsx:23](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L23)
[src/TableCell.tsx:23](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L23)

___

Expand All @@ -121,7 +121,7 @@ TableRowProps.includeLeftBorder

#### Defined in

[src/TableCell.tsx:28](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L28)
[src/TableCell.tsx:28](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L28)

___

Expand All @@ -137,7 +137,7 @@ TableRowProps.includeRightBorder

#### Defined in

[src/TableCell.tsx:18](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L18)
[src/TableCell.tsx:18](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L18)

___

Expand All @@ -153,7 +153,7 @@ TableRowProps.includeTopBorder

#### Defined in

[src/TableCell.tsx:13](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L13)
[src/TableCell.tsx:13](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L13)

___

Expand All @@ -169,17 +169,20 @@ TableRowProps.oddRowColor

#### Defined in

[src/TableRow.tsx:42](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableRow.tsx#L42)
[src/TableRow.tsx:42](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableRow.tsx#L42)

___

### renderTopBorder

`Optional` **renderTopBorder**: `boolean`

Allows control of the very top border of the TableBody to be toggled on and off
if there is no header.

#### Defined in

[src/TableBody.tsx:15](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableBody.tsx#L15)
[src/TableBody.tsx:16](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableBody.tsx#L16)

___

Expand All @@ -195,7 +198,7 @@ TableRowProps.textAlign

#### Defined in

[src/TableRow.tsx:17](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableRow.tsx#L17)
[src/TableRow.tsx:17](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableRow.tsx#L17)

___

Expand All @@ -211,4 +214,4 @@ TableRowProps.zebra

#### Defined in

[src/TableRow.tsx:27](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableRow.tsx#L27)
[src/TableRow.tsx:27](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableRow.tsx#L27)
8 changes: 4 additions & 4 deletions docs/typedoc/interfaces/TableBorder.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Include the bottom border. Default true.

#### Defined in

[src/TableCell.tsx:23](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L23)
[src/TableCell.tsx:23](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L23)

___

Expand All @@ -42,7 +42,7 @@ Include the left border. Default true.

#### Defined in

[src/TableCell.tsx:28](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L28)
[src/TableCell.tsx:28](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L28)

___

Expand All @@ -54,7 +54,7 @@ Include the right border. Default true.

#### Defined in

[src/TableCell.tsx:18](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L18)
[src/TableCell.tsx:18](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L18)

___

Expand All @@ -66,4 +66,4 @@ Include the top border. Default true.

#### Defined in

[src/TableCell.tsx:13](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L13)
[src/TableCell.tsx:13](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L13)
18 changes: 9 additions & 9 deletions docs/typedoc/interfaces/TableCellProps.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The font-size to apply to the cell.

#### Defined in

[src/TableCell.tsx:56](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L56)
[src/TableCell.tsx:56](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L56)

___

Expand All @@ -50,7 +50,7 @@ Include the bottom border. Default true.

#### Defined in

[src/TableCell.tsx:23](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L23)
[src/TableCell.tsx:23](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L23)

___

Expand All @@ -66,7 +66,7 @@ Include the left border. Default true.

#### Defined in

[src/TableCell.tsx:28](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L28)
[src/TableCell.tsx:28](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L28)

___

Expand All @@ -82,7 +82,7 @@ Include the right border. Default true.

#### Defined in

[src/TableCell.tsx:18](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L18)
[src/TableCell.tsx:18](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L18)

___

Expand All @@ -98,7 +98,7 @@ Include the top border. Default true.

#### Defined in

[src/TableCell.tsx:13](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L13)
[src/TableCell.tsx:13](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L13)

___

Expand All @@ -110,7 +110,7 @@ Whether this is a header cell or not. If not defined it will be false.

#### Defined in

[src/TableCell.tsx:51](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L51)
[src/TableCell.tsx:51](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L51)

___

Expand All @@ -122,7 +122,7 @@ Extra styling to apply. These will override existing style with the same key.

#### Defined in

[src/TableCell.tsx:41](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L41)
[src/TableCell.tsx:41](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L41)

___

Expand All @@ -134,7 +134,7 @@ How to align the text

#### Defined in

[src/TableCell.tsx:46](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L46)
[src/TableCell.tsx:46](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L46)

___

Expand All @@ -147,4 +147,4 @@ This value is between 0..1, if not specified 1 is assumed, this will take up the

#### Defined in

[src/TableCell.tsx:36](https://github.com/dmk99/react-pdf-table/blob/bebcafb/src/TableCell.tsx#L36)
[src/TableCell.tsx:36](https://github.com/dmk99/react-pdf-table/blob/ddcba28/src/TableCell.tsx#L36)
Loading

0 comments on commit 311c211

Please sign in to comment.