Viswanathan
Top achievements
Rank 1
Viswanathan
asked on 17 Jun 2018, 07:23 PM
layout is lost when I feed data using axios, but it is working with local data.
What I meant is instead of displaying Grid with Paging, it is displaying just Grid only.
working sample with local data :
https://github.com/vsaravanan/react-kendo-paging/commit/3979718024811fcd4a042711375b0058d84a936d
Layout is lost when I pull the data using axios.
https://github.com/vsaravanan/react-kendo-paging/commit/b1d2ce2d6088f74a41cbcc2542e5dea458563fbe
4 Answers, 1 is accepted
0
Hello, Viswanathan,
Thank you for the example.
I downloaded the repo that uses Axios, made a json-server to simulate fetching data and the Grid rendering was as expected:
https://www.screencast.com/t/2SpsYdUX
I did not make any changes to the code of the repo, I just used another URL for the request as it was using localhost in the example.
Please share the result on your end when using Axios.
Regards,
Stefan
Progress Telerik
Thank you for the example.
I downloaded the repo that uses Axios, made a json-server to simulate fetching data and the Grid rendering was as expected:
https://www.screencast.com/t/2SpsYdUX
I did not make any changes to the code of the repo, I just used another URL for the request as it was using localhost in the example.
Please share the result on your end when using Axios.
Regards,
Stefan
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Viswanathan
Top achievements
Rank 1
answered on 18 Jun 2018, 07:17 AM
axios is showing in this format, which is incorrect
0
Viswanathan
Top achievements
Rank 1
answered on 18 Jun 2018, 07:19 AM
I am expecting grid with page navigation bar as below
0
Hello, Viswanathan,
Thank you for the clarification.
The issue occurs because this.state.pageable is set to undefined and the Grid is expecting it to be true in order the render the paging interface.
For example, the pageable property can be set to true initially or to set in on a later state:
I hope this is helpful.
Regards,
Stefan
Progress Telerik
Thank you for the clarification.
The issue occurs because this.state.pageable is set to undefined and the Grid is expecting it to be true in order the render the paging interface.
For example, the pageable property can be set to true initially or to set in on a later state:
class App extends React.PureComponent {
state = {
products : [],
loading:
true
,
error :
''
,
pageable:
true
}
I hope this is helpful.
Regards,
Stefan
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items