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
{{ message }}
This repository has been archived by the owner on Jun 15, 2019. It is now read-only.
When calling table.toString(), either directly or indirectly (via table.width), tableLayout.computeWidths() and tableLayout.computeHeights() modifies this.options.colWidths and this.options.rowHeights respectively which causes the values to be reused or left behind in some way (i haven't tracked down the exact cause).
The use case:
I have some code that creates a row with some cells and after a while it checks the width of the resulting table (via table.width thus calling table.toString() etc.). If it then exceeds a certain amount if pops the last cell of the row and adds it to a new row and adding that row to the table.
The problem:
Because table.options.colWidths now contains an element for the cell i moved from the end of the first row to the beginning of the second row. The table.toString() somehow results in a table with no outer right border.
My temporary solution:
// Force recalculation of column widthstable.options.colWidths=[];table.options.rowHeights=[];// Probably unnecessary but just to be surereturntable.toString();
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When calling
table.toString()
, either directly or indirectly (viatable.width
),tableLayout.computeWidths()
andtableLayout.computeHeights()
modifiesthis.options.colWidths
andthis.options.rowHeights
respectively which causes the values to be reused or left behind in some way (i haven't tracked down the exact cause).The use case:
I have some code that creates a row with some cells and after a while it checks the width of the resulting table (via
table.width
thus callingtable.toString()
etc.). If it then exceeds a certain amount if pops the last cell of the row and adds it to a new row and adding that row to the table.The problem:
Because
table.options.colWidths
now contains an element for the cell i moved from the end of the first row to the beginning of the second row. Thetable.toString()
somehow results in a table with no outer right border.My temporary solution:
The text was updated successfully, but these errors were encountered: