Get filtered data source

Tags: #<Tag:0x00007fc45e483ee0>

Hello,

I am using React with handsontable, I have filters on, and I want to get the data after filtering. I used hook of addHook(‘afterFilter’, ()=> {} ) to try to get the filtered source data after filter changed.
I tried getData() which gives me plain data in the cell only (can get only what I can see on table), but I need the source data since it contains more meta data I want. I also tried getSourceData() but it gives me all the source data, not the data after filtering.

I found this post having same issue with me, https://github.com/handsontable/handsontable/issues/4606 I don’t find a solution there.

Best,
Terry

Hi,

getData is dedicated to return the visible data (after filtering). getSourceData should return the data unmodified. If you have special need then I guess you will have to arrayFilter the sourceData on your own.

We want to review our data APIs, so if you have a good use case, please share.

Kind Regards
Wojciech

Thank you very much!