- Home
- Forum
- React - EJ 2
- Drag and Drop between rows doesn't work with api data
Drag and Drop between rows doesn't work with api data
Hi, I'm facing issues with the Treegrid component.
I've tried a basic implementation of a Treegrid component that uses drag and drop between rows. Using a local JSON everything works fine but, when I switch to backend services, the grid crashes and the movement is uneven.
Is this related to the fact that I'm not using the DataManager component but I'm using anyway data retrieved from an external API instead of a local JSON?
In the docs, you've explained that to use data from an external source users should implement the DataManager to manage the data retrieving part.
The problem with that is that the API returns data related to the rest of the page too. By doing as you say, I'm forced to do at least two calls to the same endpoint to fetch the same data.
Furthermore, I'm managing the state with Redux, so letting the grid fetch data on its own, will bring a huge difference in how I store data in Redux's store.
The data retrieved by the call are the same that you find in the attached datasource.json file. Importing the file straightforward and using instead of the call to the redux's store works seamlessly.
I'm attaching a reproduction of the code and I hope you'll help me figure out what is going on.
Attachment: Components_9124bc08.zip
Attaching the screen recording to give more accurate info about the bug.
Attachment: screen_recording_bug.mov_b6c1aa8c.zip
Thanks for using Syncfusion Products.
Sample: https://www.syncfusion.com/downloads/support/forum/167173/ze/React_sample-925093589
Please reproduce the issue in the above-attached sample or share with us the following details so that we could provide you the solution as early as possible from our end.
- Data fetching code or values from API itself for treegrid related data.
- Treegrid package version or package.Json file.
Jagadesh Ram
https://ej2.syncfusion.com/react/documentation/api/treegrid/columnModel/#isprimarykey
Jagadesh Ram
We have prepared a sample based on your code example and the redux concept, but we are unable to reproduce the issue at our end. Please refer to the below sample,
Jagadesh Ram
- 4 Replies
- 2 Participants
-
FB Francesco Battista
- Jul 13, 2021 08:28 AM UTC
- Jul 20, 2021 09:20 AM UTC