marmelab / admin-on-rest-demo

Source of the admin-on-rest react.js demo, using a dummy REST service powered by FakeRest
https://marmelab.com/admin-on-rest-demo/
331 stars 181 forks source link

aor List pages error. Nan-Nan of * #17

Closed arcsecw closed 7 years ago

arcsecw commented 7 years ago

NaN-Nan of *(perPage) error appear in pages of Customers List or Posters List or Customers List Those page's url has parm "filter" image

At the same time ,a List page without parm "filter" is normal image

  1. Add &page=1 to those page can solve this problem
  2. modify code like this image
  3. modify admin-on-rest
Jonathan-Rosewood commented 7 years ago

Damn. Too find this bug 5 minutes ago :)

arcsecw commented 7 years ago

I think this bug caused by aor List component at src/mui/list/List.js image when the page is undefined parseInt(page,10) = NaN

fzaninotto commented 7 years ago

I can't reproduce it on the demo.

image

Which version of aor are you using? Can you describe the test scenario in more detail?

NikitaVlaznev commented 7 years ago

You can see it in demo there, for example.

It seems that bug appears when there is only 1 element in the filtered list.

Here is a screen from the demo page: image

NikitaVlaznev commented 7 years ago

Why not to use perPage setting that is passed to the List component by default?