Change row click event in responsive datatables

Change row click event in responsive datatables

BankersBankers Posts: 6Questions: 2Answers: 0

Dears,

Based on this link I am using databales with angularjs.
Now I have a problem on small devices when design became responsive in first column of the table as it contains a tooltip. Each time I press on any tootltip of the first column to view its details, a datatable event fires in order to show all other collapsed rows.
So is there any way to make the collapse/expand event fires only when plus (+) and minus(-) are pressed instead of first cell of each row?

Thank you

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,146Questions: 1Answers: 2,587
    Answer ✓

    Hi @Bankers ,

    Yep, you could put that + or - into its own column, as in this example,

    Cheers,

    Colin

  • BankersBankers Posts: 6Questions: 2Answers: 0
    edited July 2019

    @colin Thank you for your help, but what about big screen size? the first column will be displayed as an empty column on those screens, what to do then?

  • colincolin Posts: 15,146Questions: 1Answers: 2,587

    Hi @Bankers ,

    Unfortunately, that'll be the trade-off. There's not an easy answer to just click the icon, I'm afraid.

    Cheers,

    Colin

  • BankersBankers Posts: 6Questions: 2Answers: 0

    @colin , I make it hidden when screen width is bigger than 440px , and I forced the responsive design to appear on screen which width is < 440px.

    Cheers

This discussion has been closed.