From 3d9199856b16439b7d2ca75d7ff3f483e00eee8a Mon Sep 17 00:00:00 2001 From: simusr2 <23080613+simusr2@users.noreply.github.com> Date: Tue, 12 Nov 2019 21:56:43 +0100 Subject: [PATCH] Allowing group of columns (#40325) * Allowing group of columns A column can be a "group" of columns (Example: group header column -> Measurements, grouped column -> Length, Width, Height) * Update tabulator-tables-tests.ts Added trailing whitespaces * Update tabulator-tables-tests.ts Fixing whitespaces * Update tabulator-tables-tests.ts Removed trailing whitespace --- types/tabulator-tables/index.d.ts | 5 ++++- types/tabulator-tables/tabulator-tables-tests.ts | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/types/tabulator-tables/index.d.ts b/types/tabulator-tables/index.d.ts index d849085592..63e428f059 100644 --- a/types/tabulator-tables/index.d.ts +++ b/types/tabulator-tables/index.d.ts @@ -1051,8 +1051,11 @@ You can pass an optional additional property with sorter, sorterParams that shou /** Show/Hide a particular column in the HTML output*/ htmlOutput?: boolean; - /**If you don't want to show a particular column in the clipboard output you can set the clipboard property in its column definition object to false */ + /** If you don't want to show a particular column in the clipboard output you can set the clipboard property in its column definition object to false */ clipboard?: boolean; + + /** A column can be a "group" of columns (Example: group header column -> Measurements, grouped column -> Length, Width, Height) */ + columns?: ColumnDefinition[]; } interface CellCallbacks { diff --git a/types/tabulator-tables/tabulator-tables-tests.ts b/types/tabulator-tables/tabulator-tables-tests.ts index 1cae225a6e..e977e5605e 100644 --- a/types/tabulator-tables/tabulator-tables-tests.ts +++ b/types/tabulator-tables/tabulator-tables-tests.ts @@ -525,3 +525,11 @@ colDef.editor = (cell, onRendered, success, cancel, editorParams) => { const successful: boolean = success('test'); return editor; }; + +let groupColDef: Tabulator.ColumnDefinition = { + title: 'Full name', field: '', + columns: [ + {title: "First name", field: ''}, + {title: "Last name", field: ''} + ] +};