DevExpress / devextreme-reactive

Business React components for Bootstrap and Material-UI
https://devexpress.github.io/devextreme-reactive/
Other
2.08k stars 382 forks source link

Issue with remote data, filtering and pagination #662

Closed renatofl closed 5 years ago

renatofl commented 6 years ago

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 commented 6 years ago

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 commented 5 years ago

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 ...

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

LazyLahtak commented 5 years ago

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[bot] commented 5 years ago

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.