Quantcast
Channel: Editor — DataTables forums
Viewing all articles
Browse latest Browse all 3740

How to change the Edit event URL?

$
0
0

I have an application where I can change the context (the Year) of the data. So my URLs will change based on this selection (eg, /properties?year=2018). I know how to update DataTables object, but how can I update the Editor URLs? For example I have defined my edit event:

ajax: {
      edit: {
          type: 'PATCH',
          contentType: 'application/vnd.api+json',
          url: '/properties/_id_/values?taxyear=' + taxYear,
       },

Then when my UI changes the Year, I need to update the edit url. Is there an API for this? I saw that I can get the editor object from editor.on('initEdit', function(e, node, data)
The e object gives me access to a property s which contains the editor object. But I'm not sure I can always refer to that as e.s. Is there an API for getting it from the event e?


Viewing all articles
Browse latest Browse all 3740

Trending Articles