responsive table - opened row stays selected on data export

responsive table - opened row stays selected on data export

AlessandrovaAlessandrova Posts: 26Questions: 8Answers: 0
edited December 2024 in Free community support

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

  • kthorngrenkthorngren Posts: 21,554Questions: 26Answers: 4,994
    Answer ✓

    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 like td:not(:first-child) if you place the responsive control in the first column.

    Kevin

  • AlessandrovaAlessandrova Posts: 26Questions: 8Answers: 0

    Thanks, Kevin.
    I'll look into it to see which is the best workaround.
    A.

Sign In or Register to comment.