Replies: 1 comment
-
I just added the ability to pass in any data property as a function, which will be executed as needed: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As V4 is virtual and fetches the title during scrolling, would it be possible to have an override callback "get_node_title(node_data)" that passes the node data and returns the title html?
The reason for this is for speed with dynamic node titles and even titles that are HTML, as this would save creating complex title HTML for all nodes, when only a very few will need it.
For example if I have a node that has a title called "Thing 1a" followed by a dynamic calculated value that is maybe a quantity of of all nodes called "Thing 1a", so the title would be:
Thing 1a (12)
The value 12 is dynamic and would change every time another node with a title "Thing 1a" is added or deleted. To save changing the data as well as the title of every node, if we had the callback it would increase speed and we would only need to update the data or neither in the above case.
The above is very simplistic, a jsTree I use has many dynamic values in the title, and the title is an HTML table, so every time I need to update, I need to update the HTML of all the effected titles, and many are not even displayed on the DOM and may never be (they might be in a collapsed branch), instead of just updating only the node data and the very few visible (rendered) nodes.
Beta Was this translation helpful? Give feedback.
All reactions