crisward / riot-grid2

Version 2. With new api and optimised for high column numbers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom tags for headers

PascalLeMerrer opened this issue · comments

Hi Cris

Do you think it would be possible to use custom tags for the column header rendering, just like you allow it for content cells?

Declaring the columns could look like this:

var columns = [
    {label:'#',field:'id',width:50,fixed:true,class:'identifier',headerTag:'sort-lines'},
    {label:'name',field:"name1",width:120,fixed:true,class:'name primary',headerTag:'filter-lines'},
    {label:'name2',field:"name2",width:120,class:['name','secondary']},
    {label:"popularity",field:"popularity",width:200,tag:"image-cell"}
]

It could be used to trigger actions like sorting the array according to the content of a given column, or display a input field to filter its content (just like in a spreadsheet)

What do you think of this suggestion?

Sounds good.

I'll update this when I have something ready, may take me a while...

Just to let you know, I've not forgot about this. Just seems to have stuff to do in all directions.

Let's face it, if I've not done this in 2 years, so it's probably not going to get done. Riot4 is almost out of beta and this component won't work with it, so I'll admit defeat and close this.