Search on specific columns in Angular App

Tags: #<Tag:0x00007efc651804d0> #<Tag:0x00007efc651802f0>

Hi,

I have added working global search functionality on entire handsontable in my Angular App. However it is causing slowdown/crashing page on large dataset (error was found with data around 7000 rows… and in our app rowscount can be much more than this).

So can we expect this to be fixed if we reduce the search on 2 or 3 columns instead of entire handsontable columns (currently I have 30 columns) ? If yes, can you please provide example of the same ?

I have attached below screenshot of my global search functionality:


I have also gone through below topics, but not found useful.


Is there any way to restrict the search plugin to 2-3 columns only and will it help to fix above issues ?

Hi @sam

I think the solution provided by my colleague here is the best way to restrict the global search to specific column, or the range of columns (using the conditional statements). This example is a good guidance on how it can be implemented:

https://jsfiddle.net/aszymanski/aj5dhym2/

Hi @adrian.szymanski,

Thanks for the reply.

Can you please convert above jsfiddle example in Angular as I am getting error on arguments (Argument of type ‘IArguments’ is not assignable to parameter of type ‘[instance: any, row: any, col: any, data: any, testResult: any]’) at below row:
DEFAULT_CALLBACK.apply(this, arguments);

Hi @sam

The example I sent is a guide on how it can be done, and its logic is universal, so it needs to be adjusted to the framework you use.

Hi @adrian.szymanski

I have implemented the same logic mentioned above but it is still searching for entire handsontable columns. However I want to increase efficiency of the search by limiting the search only for 2 columns instead of entire table.
Can you please provide any alternative to increase efficiency of the search function ?

Can you please share your current implementation? With the solution I provided earlier it should restrict the search area to the chosen columns.

Hi @sam do we have any updates regarding the requested demo?