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: page is not reseted after global filtering #184

Closed
RushPVA opened this issue Nov 16, 2017 · 6 comments
Closed

DataTable: page is not reseted after global filtering #184

RushPVA opened this issue Nov 16, 2017 · 6 comments
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@RushPVA
Copy link

RushPVA commented Nov 16, 2017

I have DataTable without lazy loading with pagination and global filter.
If I click to second page and then change filter input to leave only one record in table, then DataTable will not be reseted to the first page. The issue is reproducible on the demo page.
https://www.primefaces.org/primereact/#/datatable/filter

http://prntscr.com/hb64za

@ebonventi
Copy link

@RushPVA, hello, i tried to reproduce this issue in demo page, but for me it works fine.
datable-demo.pptx

Please check your browser console log to possible errors. If you are using google chrome, you can add https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi to help you

@cagataycivici cagataycivici added this to the 1.2.1 milestone Nov 17, 2017
@RushPVA
Copy link
Author

RushPVA commented Nov 17, 2017

try global filter(not column filter)

@RushPVA
Copy link
Author

RushPVA commented Nov 17, 2017

i reproduced this issue on the last versions of Firefox and Chrome

@cagataycivici cagataycivici changed the title DataTable: page is not reseted to first(or last) after filtering DataTable: page is not reseted after global filtering Nov 28, 2017
@cagataycivici cagataycivici self-assigned this Nov 28, 2017
@cagataycivici cagataycivici added the Type: Bug Issue contains a defect related to a specific component. label Nov 28, 2017
@qmn1711
Copy link

qmn1711 commented Dec 5, 2018

It's happening on https://www.primefaces.org/primereact/#/datatable/filter (version maybe 2.0.0-rc.1)

Steps:

  1. Go to any page except the first page
  2. Search global with any value of the first page (ex. ee8a89d8)

Expects:
Database should show 1 row contains ee8a89d8 at page 1

Actual:
Database shows page 1 but with empty data

@djapal
Copy link

djapal commented Feb 13, 2019

it doesnt work in React >= 16.7. maybe it's a componentWillReceiveProps method deprecation issue?

@amayde
Copy link

amayde commented Mar 5, 2019

Workaround :

Add ref in the datatable definition
<DataTable ref={(el) => this.dt = el} . . . </DataTable>

Add this line when the global filter value change
this.dt.setState({ first: 0 });

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

No branches or pull requests

6 participants