New data does not appear in filtered column

Tags: #<Tag:0x00007efc64bdee78> #<Tag:0x00007efc64bdebf8>

Hi,

There is a bug in ‘filter_by_value’ option when the filter is applied to some column, then the new row is added, the column in which the filter is applied is not updated with the new data.

Steps to reproduce:

  1. Filter any column using filter_by_value
  2. Click the button to add a new data
  3. Check the filtered column, the new data is not added
  4. Check unfiltered column, new data is correctly added

Hi @hjeong1200

I checked the example and I think the reason for this problem could be the fact, that you are altering the data set purely by manipulation the state, and not using any of our methods that will add the new data.

You can read more about them here: https://handsontable.com/docs/react-data-grid/binding-to-data/#data-manipulating-api-methods

And additionally, I can suggest to use the alter() method to insert a new row, and then, either setDataAtCell() or, the setDataAtRowProp(), which should be more suitable in your case.

Hi @adrian.szymanski,

Thank you for the answer.
alter() and setDataAtRowProp() suits well in my case.

Hi @hjeong1200

Thank you for the update. I’m glad that this solution works for you. I will close this topic now in that case.