vue-treeselect
vue-treeselect copied to clipboard
TURN OFF console.log of multiple parents error
(I saw there's a question related to this, but it's closed, wrote there but got no response)
I have a project where nodes have multiple parents and need to be shown in tree in the different positions, if repeated it works actually properly, it selects or deselects the nodes in all instances (as it should). In my project is not an error/warning, can i deactivated the console.log somehow so i stop getting these warnings please?
[Vue-Treeselect Warning] Detected duplicate presence of node
And thank you for this great component @riophae
You may want to use the normalizer feature to change the ID. For example, you can use lodash's uniqueId
to get a unique ID based on the actual ID.
normalizer(node) {
return {
id: _.uniqueId(node.id),
label: node.label,
children: node.children
}
}
You may want to use the normalizer feature to change the ID. For example, you can use lodash's
uniqueId
to get a unique ID based on the actual ID.normalizer(node) { return { id: _.uniqueId(node.id), label: node.label, children: node.children } }
thanks for your comment, this answer would change the behavior. I DO NEED multiple parents for children, and if the child is activated in one place of the tree, IT SHOULD BE ACTIVATED in all instances. it is behaving like that already, which means, THE FUNCTIONALITY IS CORRECT for what I need. giving the items unique IDs would change this behavior and the child would only be activated in the instance in which is clicked
I just need to get rid of the console log warnings
Do you think it would be a nice feature to set an option for not showing the bug/warning messages?
I also require to have the same item more than once in different "groups". The functionality works by using the same ID, but errors are shown.
Can we at least switch to console.warn
instead of console.error
?
I have the same issue. Any way to get rid of it?
+1 same issue. any update to add an option to use same id in different groups?
+1 same issue.
Guys, this package is abandoned - the last update was on Nov 9, 2019.
any update on this issue? how to ignore this error
UP