Is it possible to use Editor without a backend database?

Is it possible to use Editor without a backend database?

talmnestalmnes Posts: 2Questions: 1Answers: 0

I like the idea that Datatable is able to consume json and populate a table. Then I am free to make that json available the way I want. However, it seems like this separation of concerns is not present when also using Editor. Or am I mistaken? To me it seems like I need to have a database server side to make Editor work?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 62,241Questions: 1Answers: 10,211 Site admin

    At the moment Editor fundamentally does require a process that will update the data in a data store - typically this is an Ajax request to the server that will update a database, but equally you can set the ajax option to provide your own data store such as localStorage, or as shown in this example the table itself. That only provides edit currently (create and delete could easily be added in the same way) and this ability to edit the table without any extra configuration is something that will be built into Editor 1.6.

    Regards,
    Allan

  • talmnestalmnes Posts: 2Questions: 1Answers: 0

    Ok, thanks for your answer, Allan.
    How about using the serverSide prop.? Then I could provide a json api which GETs the data and equally a PUT/POST/DELETE endpoint to receive post from client. I will not be getting the extra help from the Editor-class, with processing and validating etc.. but I will be able to use my own backend.

    My reason for asking this is that I am building an add-on/extension to an online system. This system has its own database but are not providing access to it. Only limited access via an API. My add-on will receive an cvs file from the user, display this and let the user edit it, before sending it into the database via the api.
    I really don't need an extra database, and, I must be able to handle a dynamic range of columns.

  • allanallan Posts: 62,241Questions: 1Answers: 10,211 Site admin
    Answer ✓

    DataTables can consume JSON data from wherever you point it to. Your server-side would need to implement server-side processing if you want to use the serverSide option.

    Allan

This discussion has been closed.