Problem with child rows

Problem with child rows

sjw01sjw01 Posts: 67Questions: 36Answers: 1

I have implemented the Child Rows example to show extra information and it works great for the most part.

I have run into a problem that I think might be a bug?

Expanding/contracting works fine EXCEPT when I use the search field.
When results are filtered, sometimes the first row might work but more often than not - none of them work
I've checked the code and the "shown" css class isn't being added

I've checking the console and there are no errors being thrown so I don't know what is going wrong.

Is this a known issue?

My gut instinct is telling me that perhaps, if I click the 2nd row then it is referencing the actual 2nd row from the original list... Not the newly rendered 2nd row...

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @sjw01 ,

    I just tried it here on this example page, and everything is working as expected when I open/close while filtering, so it suggests the problem is more specific to your implementation.

    Would you be able to create a live example that demonstrates the problem so we can take a look, please.

    Cheers,

    Colin

  • sjw01sjw01 Posts: 67Questions: 36Answers: 1
    edited April 2018

    Thanks for responding.

    Here I have created an example:
    You can see, by clicking the icon in column 1 - it opens the child row.

    However, simply select RO Advisor Name = Greg Parsons and then try clicking.

    If you clear the filter - it works again

    Thank you

  • sjw01sjw01 Posts: 67Questions: 36Answers: 1
    edited April 2018

    Here is the example: http://live.datatables.net/puzekita/1/edit

    Filter by RO Advisor Name to see the icon become unclickable

    NOTE: I also found, through testing this example, that the click doesn't work on page 2 of the results - Only page 1 works
    Also, if I change the "rows per page" from 10 to 25 - no clicking works after Row 10

    And as mentioned, no errors are showing in the console

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    edited April 2018 Answer ✓

    Hi @sjw01 ,

    You're falling over this one: https://datatables.net/faqs/#events

    The fix, is to change the event handler like this: http://live.datatables.net/begasora/1/edit

    Nice page, btw! :)

    Cheers,

    Colin

  • sjw01sjw01 Posts: 67Questions: 36Answers: 1

    Thanks for being so helpful and thanks for the kudos on the page.
    I have been using Google Charts and got sick of its inflexibility and found DataTables last week and it has been fantastic!

This discussion has been closed.