How do I avoid duplicate ids with Responsive Child Rows?

How do I avoid duplicate ids with Responsive Child Rows?

chazechaze Posts: 1Questions: 1Answers: 0

We have an input element tag with a unique id in a column. Our table is set for responsive, using the child element to display the content in a readable manner and showing them by default. Under the hood, DataTables hides the original row and copies the content to the child row for mobile views. When this happens, the input's unique id is duplicated because the original table row is hidden.

How do I resolve this issue so that only one id is used? Is there a way to make dataTables remove the markup for the old table row instead of hiding it? Or is there some other method I could use?

Thanks in advance for any help!

Answers

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Hi @chaze ,

    Take a look at Allan's comment on this thread - that should do the trick for you too.

    Cheers,

    Colin

This discussion has been closed.