Skip to content

Release v0.3.11

Compare
Choose a tag to compare
@lauris lauris released this 02 Dec 16:32
· 76 commits to master since this release

This release introduces two new features - column sorting events and option to skip a specific column on row duplication.

Column sorting

Enable sorting on a grid with an option {sortable: true} passed to Sensei Grid instance. When enabled column headers will be clickable and on a click an icon will indicate the sorting order. Also an event will be fired: "column:sort". Use this event to sort and transform the data as needed. The data sorting itself is not implemented in Sensei Grid core, but a simple demo is provided in example.js file. The sorting implementation is left out of Sensei Grid because each use case requires a different implementation, for example, in some cases you would need to make an remote request for the sorted data, but in other cases a local sorting is just fine.

Skip values when duplicating a row

A row can be duplicated by pressing ctrl+d or cmd+d and until now all row data was cloned. A new option is added to configure which values should be left out when a row is duplicated. Pass {skipOnDuplicate: ["id", "foo", "bar"]}} to Sensei Grid instance to define which columns should be omitted.

Usage examples can be found in example.js file.