responsive.renderer without child rows

responsive.renderer without child rows

MarcosLeaoMarcosLeao Posts: 6Questions: 1Answers: 0

Link to test case: Here

Hi! I am grateful for this library.

I have a table that, in addition to the normal columns, should display up to 5 optional notes.

Using "responsive", I configured the 5 notes with className: "none", so they are displayed in a child row.

Everything works very well, as can be seen at "test case".

Except when there is no note, as with "Jena Gaines" in the example above.

Since responsive.renderer has not generated any child rows, there is nothing to display, which is expected behavior.

But the control icon, +green, when clicked, changes to -red and no longer goes back to +green.

I ask:

Am I using the right strategy for this use case?

What can I do so that, even without child rows, when -red is clicked, it goes back to +green?

Or better yet, any solution so that, if there are no child rows, the +green control icon is not displayed?

Thank you very much.

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    edited November 2021 Answer ✓

    Yep, you're using as per the documentation, so looks like a bug there. There is an easy workaround though, just return undefined instead of false, see your example updated here.

    I've raised it internally (DD-2367 for my reference) and we'll report back here when there's an update.

    Cheers,

    Colin

  • MarcosLeaoMarcosLeao Posts: 6Questions: 1Answers: 0

    Hi Colin,

    Thank you very much for the quick response.

    This workaround solves the situation well, but I'm sure a definitive solution will be even better.

    My gratitude to everyone who develops this library!

Sign In or Register to comment.