When a Fixed column contains a link, when clicked, the entire row is selected. How to avoid it?

When a Fixed column contains a link, when clicked, the entire row is selected. How to avoid it?

jstuardojstuardo Posts: 99Questions: 40Answers: 0
edited September 2018 in Free community support

Hello,

Please load this Fiddle: https://jsfiddle.net/desytec/q17L2nbv/41/

see the pencil of the last column (the icon on the right). When that is clicked (actually only shows an alert), the entire row is selected.

I there a way to avoid that? This does not happen if column is not fixed.

Thanks
Jaime

This question has an accepted answers - jump to answer

Answers

  • rf1234rf1234 Posts: 2,906Questions: 87Answers: 414
    select: {
        style: 'multi',
        selector: 'td:first-child:not(:last-child)'
    }
    

    Don't know about the fixed column issue... but the above code works in your case. Probably a bug in "fixed column"?!

  • rf1234rf1234 Posts: 2,906Questions: 87Answers: 414

    Sorry, no that also doesn't really work because now nothing is selectable any longer. Looks like a bug in "fixed column".

  • jstuardojstuardo Posts: 99Questions: 40Answers: 0

    Hello.. I see.... If selector is "td:first-child", only first cell should be to select the row..... When the icon in a fixed column also selects the row, it means that plugin has a bug... maybe I will need to dig into its source code, unless one of the developer is reading this thread.

    Regards
    Jaime

  • allanallan Posts: 62,992Questions: 1Answers: 10,367 Site admin
    Answer ✓

    Yes indeed, use .select-checkbox as your selector: updated example.

    The issue with :first-child in that example is the use of FixedColumns which replicates the fixed columns, thus causing there to be another :first-child per fixed column! Selecting based on the already defined class name resolves that.

    Allan

  • jstuardojstuardo Posts: 99Questions: 40Answers: 0

    Thanks! it worked now.

This discussion has been closed.