Duplicate id's

Duplicate id's

menashemenashe Posts: 203Questions: 47Answers: 2

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?

Answers

  • allanallan Posts: 64,069Questions: 1Answers: 10,563 Site admin

    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.