You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I came across an error in the typing of the margins property in the TableConfig interface definition.
In the table function, the config parameter can include a margins object, which is expected to have four properties: left, top, bottom, and width. You can see this implementation in this reference.
However, if you look at the typings, the Table definition expects a TableConfig object (see Table definition). In this TableConfig, the margins property is incorrectly defined as a number instead of an object with the shape { top: number, bottom: number, left: number, width: number }.
This discrepancy leads to issues when you pass a TableConfig like this: tableConfig:{ margins: 10 }
In this case, when the table reaches the end of the page, it won’t create a new page as expected.
It’s important to note that if no margins are provided in the tableConfig, the program uses default margins (See here). However, if a number is passed (as allowed by the current typings), the program detects that a value is present and does not apply the default margins, leading to unexpected behavior.
The text was updated successfully, but these errors were encountered:
I came across an error in the typing of the
margins
property in theTableConfig
interface definition.In the
table
function, theconfig
parameter can include amargins
object, which is expected to have four properties:left
,top
,bottom
, andwidth
. You can see this implementation in this reference.However, if you look at the typings, the
Table
definition expects aTableConfig
object (see Table definition). In thisTableConfig
, themargins
property is incorrectly defined as anumber
instead of an object with the shape{ top: number, bottom: number, left: number, width: number }
.This discrepancy leads to issues when you pass a
TableConfig
like this:tableConfig:{ margins: 10 }
In this case, when the table reaches the end of the page, it won’t create a new page as expected.
It’s important to note that if no margins are provided in the tableConfig, the program uses default margins (See here). However, if a number is passed (as allowed by the current typings), the program detects that a value is present and does not apply the default margins, leading to unexpected behavior.
The text was updated successfully, but these errors were encountered: