ce icon indicating copy to clipboard operation
ce copied to clipboard

Feature Request: Filter by Column

Open lyassa opened this issue 7 years ago • 2 comments

Have a text box appear on top of the column(s) specified by the user in the column configuration. Then filter the table rows based on the value the user type in this text box. For Example: columns: [ { title: 'My Title', type: 'dropdown', filter: true }, ... ...

lyassa avatar Nov 08 '19 01:11 lyassa

Much needed.

thelightbringer avatar Nov 21 '19 06:11 thelightbringer

This is implemented in v4... filters: true

see: https://bossanova.uk/jexcel/v4/examples/column-filters

However the example on the page is actually missing the configuration flag filters: true, which is set to false by default:

var data1 = [
    ['US', 'Cheese', '2019-02-12'],
    ['CA', 'Apples', '2019-03-01'],
    ['CA', 'Carrots', '2018-11-10'],
    ['BR', 'Oranges', '2019-01-12'],
];

mySpreadsheet = jexcel(document.getElementById('spreadsheet'), {
    data:data1,
    columns: [
        {
            type: 'dropdown',
            url:'https://bossanova.uk/jexcel/v4/countries',
            width:200,
        },
        {
            type: 'text',
            width:200,
        },
        {
            type: 'calendar',
            width:200,
        }
     ],

     filters: true, // missing on example page

     allowComments:true,
});

deftdawg avatar Jun 24 '20 13:06 deftdawg