Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • searchUI

Index

Properties

Methods Event Listeners

Methods Other

Properties

input: HTMLElement

Input field

let chart = new OrgChart("#tree", {});
chart.onInit(() => {
chart.searchUI.input.focus();
});
chart.load(nodes)

Event Listeners Methods

  • on(type: "searchclick" | "add-item" | "show-items" | "hide", listener: (sender: searchUI, args: any, args1: any, args2: any) => boolean | void): searchUI
  • The on() method of the searchUI interface sets up a function that will be called whenever the specified event is delivered to the target. *

    let chart = new OrgChart("#tree", {});
    chart.searchUI.on('searchclick', function (sender, args) {
    sender.hide();
    });
    chart.load(nodes)

    Parameters

    • type: "searchclick" | "add-item" | "show-items" | "hide"

      A case-sensitive string representing the event type to listen for.

    • listener: (sender: searchUI, args: any, args1: any, args2: any) => boolean | void

      The object that receives a notification when an event of the specified type occurs. This must be a JavaScript function.

        • (sender: searchUI, args: any, args1: any, args2: any): boolean | void
        • Parameters

          • sender: searchUI
          • args: any
          • args1: any
          • args2: any

          Returns boolean | void

    Returns searchUI

Other Methods

  • createItem(img: string, id: string | number, first: string, second: string): string
  • OrgChart.searchUI.createItem = function (img, id, first, second) {
    return
    `<tr data-search-item-id="${id}">
    <td class="boc-search-image-td">
    <div class="boc-search-photo" style="background-image: url(${img})"></div>
    </td>
    <td class="boc-search-text-td">${first} <br/>${second}</td>
    </tr>`;
    };

    Parameters

    • img: string
    • id: string | number
    • first: string
    • second: string

    Returns string

  • find(value: string): void
  • Finds filed data by specified value

    let chart = new OrgChart("#tree", {});
    chart.onInit(() => {
    chart.searchUI.find("Denny");
    });
    chart.load(nodes)

    Parameters

    • value: string

      search for value

    Returns void

  • hide(): void
  • Hides the search grid

    let chart = new OrgChart("#tree", {});
    chart.searchUI.on('searchclick', function (sender, args) {
    sender.hide();
    });
    chart.load(nodes)

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Static property
  • Static method

Settings

Theme

Generated using TypeDoc