editItem()
edits a Tree item
editItem(id: Id, config: IEditorConfig): void;
Parameters:
id: string | number
- the id of an itemconfig: object
- optional, the config object of an editor
Example
tree.events.on("itemDblClick", function (id) {
tree.editItem(id);
});
The config parameter includes the following properties:
mode | (string) the type of an editor:
|
options | (array) optional, an array of additional options This property works only with mode: "select" |
For instance:
tree.events.on("itemDblClick", function (id) {
tree.editItem(id,{ mode: "select", options: [1, 2, 3, 4, 5] });
});