Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataTable onValueChange callback one key press behind when using custom InputText filter #777

Closed
dolbeew opened this issue Feb 19, 2019 · 0 comments · Fixed by #876
Closed
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@dolbeew
Copy link

dolbeew commented Feb 19, 2019

I'm submitting a ...

[x] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57

Plunkr Case (Bug Reports)

https://next.plnkr.co/edit/8DCDxrHo1Z0g44ix?preview

Current behavior
When typing into the filter input, the data returned by onValueChange is the previous set of filtered data. If I type a single character, the entire data set is returned. If I type a second character, the data returned is filtered only using the first character, and so forth. The data displayed in the table is correct, only the callback is wrong.

Expected behavior
The data returned by onValueChange reflects the current input of the filter field.

Minimal reproduction of the problem with instructions
Create a custom filter element with simple InputText. Print the data returned from onValueChange to the console.

  • React version:
    16.6.3

  • PrimeReact version:
    3.0.0

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

  • Language: [all | TypeScript X.X | ES6/7 | ES5]
@dolbeew dolbeew changed the title DataTable onValueChange callback one step behind when using custom InputText filter DataTable onValueChange callback one key press behind when using custom InputText filter Feb 21, 2019
mertsincan added a commit that referenced this issue May 21, 2019
Fixed #777 onValueChanged callback receiving outdated filtered data
@mertsincan mertsincan self-assigned this May 21, 2019
@mertsincan mertsincan added the Type: Bug Issue contains a defect related to a specific component. label May 21, 2019
@mertsincan mertsincan added this to the 3.1.4 milestone May 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants