fix for #10271 jstree

fix for #10271 jstree - get_path params not marked to be optional
This commit is contained in:
Adam Pluciński
2016-07-25 11:00:48 +02:00
parent c42b2ba16c
commit bef1a95d0c
2 changed files with 6 additions and 1 deletions

View File

@@ -109,3 +109,8 @@ var tree = $('a').jstree();
tree.move_node('a', 'b', 0, (node: any, new_par: any, pos: any) => { }, true, true);
tree.copy_node('a', 'b', 0, (node: any, new_par: any, pos: any) => { }, true, true);
// #10271 jstree - get_path params not marked to be optional
tree.get_path('nodeId');
tree.get_path('nodeId', '/');
tree.get_path('nodeId', '/', true);

2
jstree/jstree.d.ts vendored
View File

@@ -830,7 +830,7 @@ interface JSTree extends JQuery {
* @param {Boolean} ids if set to true build the path using ID, otherwise node text is used
* @return {mixed}
*/
get_path: (obj: any, glue: string, ids: boolean) => any;
get_path: (obj: any, glue?: string, ids?: boolean) => any;
/**
* get the next visible node that is below the `obj` node. If `strict` is set to `true` only sibling nodes are returned.