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

Issue with remote data, filtering and pagination #662

Closed
renatofl opened this issue Jan 10, 2018 · 4 comments · Fixed by #663
Closed

Issue with remote data, filtering and pagination #662

renatofl opened this issue Jan 10, 2018 · 4 comments · Fixed by #663
Assignees
Labels
Grid The DevExtreme Reactive Grid component question

Comments

@renatofl
Copy link

Current Behaviour

When using remote data + filtering + pagination, if you are in page 17 and filter for something that only has 2 pages, grid currentPage stays in 17 and don't show any data.

If you change currentPage state to 0 when changingFilter, the grid shows data, but pagination doesn't work as intented (Ex: In my case, pagination shows 321 of 26)

Expected Behaviour

When using remote data + filtering + pagination, if you are in page 17 and filter for something that only has 2 pages, grid currentPage should change to first page and fix pagination.

Steps to Reproduce (for Bugs)

1- Create a grid with 2 or more pages.
2- Go to page >= 2
3- Filter for something that is only showed in pages before the page selected in step 2.
4- Grid doesn't show data.

Your Environment

devextreme-reactive: 1.0.0-beta.3
react: 16.2.0
browser: Chrome
bootstrap: none
react-bootstrap: none
material-ui: 1.0.0-beta.27

@kvet kvet self-assigned this Jan 10, 2018
@kvet kvet added the bug label Jan 10, 2018
@kvet
Copy link
Contributor

kvet commented Jan 10, 2018

Hi,
 
Thank you for bringing this to our attention. I've reproduced the issue in the following example: https://stackblitz.com/edit/react-gqgmcd?file=index.js.

@GarrisonJ
Copy link

GarrisonJ commented May 2, 2019

I'm having this exact issue. Was this fixed on a newer version than what I'm using?

Just like @renatofl I'm using remote data, filtering, and paging.

I'm using ...

  • React Grid

Current Behaviour

If I'm on a page and I filter the results down so there are no longer enough pages to reach the page I'm on, the grid shows I'm on page 1 but there are no rows.

Expected Behaviour

The grid should switch to page 1 and show the appropriate rows.

Environment

  • dx-react-core: 1.4.0
  • dx-react-grid: 1.4.0
  • react: 16.4.1
  • browser: chrome/firefox
  • dx-react-grid-bootstrap4: 1.4.0

@ushkal ushkal self-assigned this May 8, 2019
@ushkal ushkal reopened this May 8, 2019
@ushkal ushkal assigned LazyLahtak and unassigned ushkal Jul 16, 2019
@LazyLahtak
Copy link
Contributor

Hi,
 
When you use local data with filtering and paging, the IntegratedPaging plugin calculates your currentPage value in the state. However, when you use remote data, IntegratedPaging is replaced by CustomPaging, and currentPage has to be calculated manually.
Refer to this example illustrating how to do that.

@lock
Copy link

lock bot commented Jul 27, 2019

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Grid The DevExtreme Reactive Grid component question
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants