Type alias EditOptionsType

EditOptionsType: {
    apply?: null | ((e) => any) | Promise<any>;
    beforeEdit?: null | ((e) => boolean) | string;
    debounce?: number;
    edit?: null | ((e) => void);
    maxlength?: null | number;
    minlength?: number;
    select?: boolean;
    slowClickDelay?: number;
    trigger?: string[];
    trim?: boolean;
    validity?: boolean;
}

Note:
This options are used for renaming node titles.
There is also the tree.change event to handle modifying node data from input controls that are embedded in grid cells.

Type declaration

  • Optional apply?: null | ((e) => any) | Promise<any>
  • Optional beforeEdit?: null | ((e) => boolean) | string

    beforeEdit(e) may return an input HTML string. Otherwise use a default.

  • Optional debounce?: number

    Used to debounce the change event handler for grid cells [ms].

    Default

    100
    
  • Optional edit?: null | ((e) => void)
  • Optional maxlength?: null | number

    Maximum number of characters allowed for node title input field.

    Default

    null;
    
  • Optional minlength?: number

    Minimum number of characters required for node title input field.

    Default

    1
    
  • Optional select?: boolean

    Select all text of a node title, so it can be overwritten by typing.

    Default

    true
    
  • Optional slowClickDelay?: number

    Handle 'clickActive' only if last click is less than this ms old (0: always)

    Default

    1000
    
  • Optional trigger?: string[]

    Array of strings to determine which user input should trigger edit mode. E.g. ["clickActive", "F2", "macEnter"]:
    'clickActive': single click on active node title
    'F2': press F2 key
    'macEnter': press Enter (on macOS only)
    Pass an empty array to disable edit mode.

    Default

    []
    
  • Optional trim?: boolean

    Trim whitespace before saving a node title.

    Default

    true
    
  • Optional validity?: boolean

    Permanently apply node title input validations (CSS and tooltip) on keydown.

    Default

    true