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)
A case-sensitive string representing the event type to listen for.
The object that receives a notification when an event of the specified type occurs. This must be a JavaScript function.
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>`;
};
Finds filed data by specified value
let chart = new OrgChart("#tree", {});
chart.onInit(() => {
chart.searchUI.find("Denny");
});
chart.load(nodes)
search for value
Hides the search grid
let chart = new OrgChart("#tree", {});
chart.searchUI.on('searchclick', function (sender, args) {
sender.hide();
});
chart.load(nodes)
Generated using TypeDoc
Input field