Duplicate id's

Duplicate id's

menashemenashe Posts: 205Questions: 48Answers: 3

When generating a table, id tags get an auto-generated tag of "row_XXX" The tag is clearly using the id number (key) of the applicable table.

I am using nested tables (from your Parent/Child) example. Since each table has an id/key that started at 1, I am encountering nested tables in the same HTML subtree with identical id's! When looking in DevTools and hovering over the first one (which has a squiggly green line indicating an "issue") it says "id attribute must be unique".

Is this indeed an issue?

How can I generate a unique UID that I can use for ALL tables so that I never have duplicates?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 64,237Questions: 1Answers: 10,601 Site admin
    Answer ✓

    Are you using the server-side libraries here? If so, use the idPrefix() method to use something other than the default row_.

    Allan

Sign In or Register to comment.