// Becomes last column table.addColumn('name'); // Inserted after the current second column, moving the current third column // to index 4 table.addColumn({ key: 'price', formatter: currencyFormatter }, 2 ); // Insert a new column in a set of headers three rows deep. The index array // translates to // [ 2, -- in the third column's children // 1, -- in the second child's children // 3 ] -- as the fourth child column table.addColumn({ key: 'age', sortable: true }, [ 2, 1, 3 ]);
// Add a formatter to the existing 'price' column definition table.modifyColumn('price', { formatter: currencyFormatter }); // Change the label on a header cell in a set of nested headers three rows // deep. The index array translates to // [ 2, -- in the third column's children // 1, -- the second child // 3 ] -- the fourth child column table.modifyColumn([2, 1, 3], { label: 'Experience' });