Custom Field Names issue when dataSource is empty and we want to use addNode method to add nodes and thier children #281
Comments
What is the error message that you get in this case? What line of code? |
I'm not able to replicate your issue. Here is my example where everything works fine. http://gijgo.com/Temp/91b6e5e4-3700-4165-9f2b-d7e0790a1e75.html Are you using version 1.8.1? 1.8.1 seems to be working fine. |
We fixed that in the new development version. You can find the new build in the dist folder at github. Thanks for finding this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Configuration
var tree = $("#listItems").tree({ primaryKey: 'Id', textField: 'Title', childrenField: 'Children', uiLibrary: 'bootstrap', iconsLibrary: 'fontawesome', checkboxes: true, border: true, dataSource: $("#listItems").data("items") || [] });
Add Node
tree.addNode({ Title: 'node1'}); tree.addNode({ Title: 'node1-1' }, tree.getNodeByText('node1'));
Hint
the problem is in this below code
id = data.primaryKey ? response[i][data.primaryKey] : data.autoGenId++;
The text was updated successfully, but these errors were encountered: