Reputation: 830
I am trying to use multiple trees on a single page/view. I need the node ID's generated and numbered individually per tree.
When generating, the other trees continue generating ID # by incrementing the last number used in the previous tree. What I want is to have them all re-number starting from 1 again.
I saw that initID
was commented out in a demo.
I tried to use initID
but could not figure it out. I cannot find any documentation on it either.
Is initID
still available? If so, how do I use it? How else would I achieve this?
Upvotes: 0
Views: 367
Reputation: 14794
You could generate those keys on the server and add them to the data, or implement the defaultKey
callback option client-side in Javascript.
Note that if you enable generateIds: true
, this will lead to duplicate HTML IDs, which is not allowed. So in this case you have to choose different values for the idPrefix
option.
Upvotes: 1