ayonious/console-table-printer

Computed columns show name as title even when different title is passed

Closed this issue · 1 comments

Great job with this module.

When creating a computed column with a custom title, the column will still display the name as a title.

computedColumns: [{
    title: "my title",
    name: "col_name",
    function: row => "row value"
}]

Maybe createColumn could receive a title as well? Some pseudo-code:

export const createColum = (name: string, title: string): Column => ({ name, title: title ? title : name });

Fixed on version 2.8.2