Hello, this is really not a question, but it is actually a bug that I discovered and possibly fixed, so I would like this to be included in the documentation.

1 Answer 54 Views
Grid
Akash
Top achievements
Rank 1
Akash asked on 26 Sep 2023, 07:22 AM | edited on 26 Sep 2023, 12:33 PM
Hello, this is really not a question, but it is actually a bug that I discovered and possibly fixed, so I would like this to be included in the documentation. If you use the paging functionality of Kendo-react-grid component or even go to this page: https://www.telerik.com/kendo-react-ui/components/grid/paging/ and check the first example on the official docs page, you will notice that when you click on the dropdown and select "All" so that you can see all the possible records on the grid in that single page, you won't be able to. The grid will display "No records available". So I faced the same issue when implementing pagination on this project and as soon as I would click on "All" I won't be able to see any records. So I debugged this and found the problematic code.

const pageChange = (event) => {
    const targetEvent = event.syntheticEvent;
    const take =
      targetEvent.value === "All" ? products.length : event.page.take;
    if (targetEvent.value) {
      setPageSizeValue(targetEvent.value);
    }
    setPage({
      ...event.page,
      take,
    });
  };
Here in the second line, where const targetEvent has been initialised with event.syntheticEvent, I changed it to event.targetEvent and this started working for me. I am not sure if it will work for all the people out there or if it is even the best solution, so in the meantime I get an official update from kendo react team, I will call it as a "workaround". I am using Chrome in case it matters. I submitted this as a question because I didn't know how to submit this as a bug to the official kendo team. Hope it helps, thanks!

1 Answer, 1 is accepted

Sort by
0
Wissam
Telerik team
answered on 27 Sep 2023, 08:31 AM

Hello, Akash,

Thank you so much for reporting this issue.

Indeed `syntheticEvent` should be replaced by `targetEvent` in this example. I will make this change to the demo.

In addition, I updated your Telerik points accordingly as a small token of gratitude for your report.

Regards,
Wissam
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources!

Tags
Grid
Asked by
Akash
Top achievements
Rank 1
Answers by
Wissam
Telerik team
Share this question
or