Need help for using editor datatable as React components.
Need help for using editor datatable as React components.
Shashidhar.nk
Posts: 21Questions: 5Answers: 0
Hi Allan,
As discussed in this post, https://datatables.net/forums/discussion/44963, I need to use datatables with react, but how can i use editor datatable with react?? and How events can be handled in editor window for creating, deleting, editing?? How to start with editor datatables in react??
Thanks & Regards,
-SHASHIDHAR
This discussion has been closed.
Replies
Hi Allan,
I did some R&D, and tried to build a react component which will display a DataTable, and the got the result as in screenshot
But, if i want edit a row, i get a error message in console saying
Uncaught Unable to find row identifier For more information, please refer to https://datatables.net/tn/14
which says
Unable to find row identifier
will occur when Editor is unable to find the uniquely identifying value.JSON i get from the API is,
{"draw":0,"recordsTotal":57,"recordsFiltered":57,"data":[{"DT_RowId":"row_1","first_name":"Tiger","last_name":"Nixon","position":"System Architect","office":"Edinburgh","start_date":"25th Apr 11","salary":"$320,800"},{"DT_RowId":"row_2","first_name":"sgaa","last_name":"hfdhffh","position":"Accountant","office":"Tokyo","start_date":"25th Jul 11","salary":"$170,750"},{...}]}
can you please help me out..
Debugger is not helping me, it says
DataTables is not available on this page.
Hi Allan,
Actually,
'idsrc': 'id'
was the mistake i did, now i figured it out. now its working fine. thanksThanks for posting back - good to hear you've got it working now.
Allan
hi allan,
since DT debugger is not helping me with react, how to debug, if any help
thanks & regards,
-shashidhar
You are supposed to run the DT debugger on a browser window which is showing a DT
table.
hello @tangerine, am running DT debugger on a browser window which is showing the datatable, u can have a look at screenshot attached. But still DT debugger says
DataTables trace debugger
DataTables is not available on this page.
No screenshot attached. Perhaps your jQuery isn't available in the global name space for the page? We'd need a link to the page showing the issue to be able to offer any help.
Allan