New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. |
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: