Hi Frederik,
Greetings from Syncfusion support.
From the explanation, we understand that you want to highlight the
filtered text of the TreeView nodes. We have achieved your requirement by
implementing the below code changes.
[index.js]
//Filtering the TreeNodes
function searchNodes(args)
{
...
setTimeout(function (this)
{
listTreeObj.expandAll();
for (var i = 0; i < proxy.array_value.length;
i++) {
var
node = document
.querySelector('[data-uid="' + proxy.array_value[i]
+ '"]')
.querySelector('.e-list-text');
var regEx = new RegExp(_text, 'ig');
node.innerHTML
= (node).innerText.replace(
regEx,
'<b>$&</b>'
);
}
}, 100);
}
|
Sample : https://stackblitz.com/edit/ihty1k-cia85w?file=index.js,index.html
Check out the shared sample and get back to us if you need
any further assistance.
Regards,
Leo Lavanya Dhanaraj