You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here I use the generateFormElements method to create form elements before submitting the selected nodes. However I found that I don't need to submit unselectable nodes since they are locked and user shouldn't update them.
Also I found the generateFormElements have used getSelectedNodes where it picks up only selected nodes - but I would like to picked up partsel nodes as well and exclude all unselectable nodes.
Sure I could hack the original source code the achieve this but I think it's better to raise the issue here to hear your advice first :)
So here it goes:
Expected behavior
Enable user customize the returned nodes in generateFormElements. IMHO it could be achieved by either way:
Providing a configurable option in FancytreeOptions
Providing a configurable option when calling the generateFormElements method.
Environment
Browser type and version: Chrome 50.0.2661.86 (64-bit)
jQuery and jQuery UI versions: 1.12.3 / 1.11.4
Fancytree version: 2.17.1
enabled/affected extensions: table, dnd enabled
The text was updated successfully, but these errors were encountered:
generateFormElements() already has an optsargument. We could add an additional option (e.g. otps.filter) that accepts a callback function.
If specified, tree.generateFormElements() would use visit()instead of getSelectedNodes(), call filter(node), and serializes all nodes that we return true for?
First thanks for this brilliant library 👍
Here I use the
generateFormElements
method to create form elements before submitting the selected nodes. However I found that I don't need to submitunselectable
nodes since they are locked and user shouldn't update them.Also I found the
generateFormElements
have usedgetSelectedNodes
where it picks up onlyselected
nodes - but I would like to picked uppartsel
nodes as well and exclude allunselectable
nodes.Sure I could hack the original source code the achieve this but I think it's better to raise the issue here to hear your advice first :)
So here it goes:
Expected behavior
Enable user customize the returned nodes in
generateFormElements
. IMHO it could be achieved by either way:generateFormElements
method.Environment
table
,dnd
enabledThe text was updated successfully, but these errors were encountered: