primereact icon indicating copy to clipboard operation
primereact copied to clipboard

Datatable: globalFilter option triggered with old value

Open omansak opened this issue 2 years ago • 8 comments

Adsız

Reproducer

https://codesandbox.io/s/wonderful-glade-k33wq6

PrimeReact version

8.1.1

React version

18.x

Language

TypeScript

Build / Runtime

Preact

Browser(s)

No response

Steps to reproduce the behavior

  1. Create DataTalbe
  2. Set golbalFilter prop
  3. Create a html input elemen
  4. Create a string react state
  5. set html input value and set change event to set react state
  6. watch onFilter,onValueChange event from prime DataTable

Expected behavior

No response

omansak avatar Jun 17 '22 12:06 omansak

Hi @omansak,

I tried many things but unfortunately, I couldn't replicate this issue. Could you please attach a sample codesandbox link for us to replicate? Also, could you please try the latest primereact version?

Best Regards,

mertsincan avatar Aug 08 '22 11:08 mertsincan

Will close for now and re-open if they provide a reproducer

melloware avatar Aug 08 '22 12:08 melloware

I cannot share any sample or check again , sorry. Probably it has fixed in newer version. If i get again i will re-open.

Thanks.

omansak avatar Aug 08 '22 21:08 omansak

@omansak No worries ;) Thanks a lot for your update!

Sorry for the delayed response!

mertsincan avatar Aug 08 '22 22:08 mertsincan

I have this problem also: a. onfilter is triggered with an old value image

b. new problem, onfilter is not triggered when I erase the value on the searchbox image

Here is the codesandbox link to reproduce, just type in search and view the console:

https://codesandbox.io/s/wonderful-glade-k33wq6

durich avatar Aug 17 '22 17:08 durich

Hi, Just wanted to add, this two problems started in v8 (8.0.0 to 8.3.0), it works as intended in versions of Primereact v7 (7.0.0 to 7.2.1)

durich avatar Aug 17 '22 17:08 durich

any update ? we need really fix this bug ?

omansak avatar Sep 05 '22 21:09 omansak

If you need immediate response for this bug you probably either need PRO support or to offer a patch PR.

melloware avatar Sep 05 '22 23:09 melloware

Did anyone find a workaround yet while there is no official fix?

TripleSpeeder avatar Sep 27 '22 12:09 TripleSpeeder

This replicates the issue and I am fixing it: https://codesandbox.io/s/exciting-northcutt-7or5sf?file=/src/demo/DataTableFilterDemo.tsx

melloware avatar Oct 07 '22 13:10 melloware

@melloware thank you dude, your great

omansak avatar Oct 08 '22 12:10 omansak