ColReorder in Multi-row Head
ColReorder in Multi-row Head
fruedadev
Posts: 5Questions: 2Answers: 0
Hello,
I have the table you can see in this test case, a table with 2 rows in the header, one of them for filtering each column. The problem I have is that I am able to reorder the columns, clicking on any of these rows. But that:
- Is not desirable.
- Even if it would (I think we could live with that), if you click into the filter textbox, it selects the table's content while moving the mouse to reorder the column.
Is there any option in ColReorder to specify the exact row to be clicked? Or programmatically, if there's no option for that?
Thanks in advance.
Answers
Good idea! There was no option for that in ColReorder, so I've gone ahead and added a new
colReorder.headerRows
option which is an array of the row indexes in the header to receive the click and drag listener. This is the commit.It will be in the nightly build shortly .
Allan
I've so far workarounded it using the following code after the datatable initialization:
It works, and it's simple, but I'm wondering if there's another way to do it.
That looks good. The alternative is to use the change I committed earlier today.
Allan