responsive table - opened row stays selected on data export
responsive table - opened row stays selected on data export
Dear all,
I have made this table:
https://trovawiki.altervista.org/stampe.php
It is responsive: if you shink the page width in your browser (or if you use a small screen device) you see that when you click on a row, a dialog window is triggered, with all the info for that specific row.
So far, everything works fine.
The problem is that when a row is clicked upon and opened, it stays selected (highlighted in blue): you can read below the table "1 row selected". This affects the data which are exported. If you click on a row (to see its contents) and then export the data (for example in pdf) you'll see that only that single row is exported.
Is this a bug or is this responsive feature designed like this?
Maybe it would be easier if the row gets deselected once the dialog window is closed.
Thanks and happy New Year!
This question has an accepted answers - jump to answer
Answers
The problem is the Select and Responsive extensions are using click events on the same element (the first cell in the row) to perform their respective actions. If you don't want the row to be selected when clicking the responsive element then the best option is to create an additional column just for the responsive control. See this example.
Then configure
select.selector
to select the row when any cell is clicked except the cell that has the responsive control. Use a selector liketd:not(:first-child)
if you place the responsive control in the first column.Kevin
Thanks, Kevin.
I'll look into it to see which is the best workaround.
A.