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 Feb 1, 2022. It is now read-only.
My understanding of the spread operator is that whatever comes last when performing an object merge is what "wins". Since the defaults are defined after ...inputOptions, they always win.
I've tested this by moving ...inputOptions between the definition of columns: and the definition of the other default TableOptions (eg. colSep, printLine, etc). I can confirm that the options are respected when placed like this.
The text was updated successfully, but these errors were encountered:
The table() function as currently defined in src/styled/table.ts does not respect TableOptions overrides set by the caller.
I believe that this is due to the placement of
...inputOptions
BEFORE the definition of the default TableOption properties.cli-ux/src/styled/table.ts
Line 49 in 163600f
My understanding of the spread operator is that whatever comes last when performing an object merge is what "wins". Since the defaults are defined after
...inputOptions
, they always win.I've tested this by moving
...inputOptions
between the definition ofcolumns:
and the definition of the other default TableOptions (eg. colSep, printLine, etc). I can confirm that the options are respected when placed like this.The text was updated successfully, but these errors were encountered: