Hi @adrian.szymanski,
Thanks for the quick reply.
I have the importing and registering all modules part in my app.module.ts file already.
I also have implemented hideColumns feature in same handsontable and it is working fine.
Here the only issue that I am facing is that either hiddenRows seems to be not working or the handsontable is not rendering properly after hiderows.
Will share exact code below if it helps.
globalSearch() {
console.log(’-- 1.1 --’)
this.rowPlugin = this.hotInstance.getPlugin(‘hiddenRows’);
this.searchPlugin = this.hotInstance.getPlugin(‘search’);
this.hotInstance.render();
let queryResult = this.searchPlugin.query(this.searchValue);
console.log(’-- 1.1.1 --’)
this.rows = Array.from(new Set(queryResult.map((o:any)=> o.row)))
console.log(’-- 1.2 --’)
console.log(queryResult.length)
if(this.searchValue.length>0)
{
console.log(’-- 1.3 --’)
for(let i=1;i<=this.hotInstance.countRows();i++){
if(!this.rows.includes(i))
{
this.hiddenRowArray.push(i);
}else{
this.showRowArray.push(i);
}
}
console.log('-- 1.4 --')
this.rowPlugin.hideRows(this.hiddenRowArray);
this.rowPlugin.showRows(this.showRowArray);
}else{
console.log(’-- 1.5 --’)
for(let i=0;i<this.hotInstance.countRows();i++){
this.rowPlugin.showRow(i);
}
}
console.log(’-- 1.6 --’)
console.log(this.hiddenRowArray)
console.log(this.showRowArray)
console.log(’-- 1.7 --’)
this.hotInstance.render();
this.hiddenRowArray = [];
this.showRowArray = [];
console.log(’-- 1.8 --’)
}
And the console log: