ajax.reload()
ajax.reload()
Alexandr45
Posts: 30Questions: 1Answers: 3
ajax.reload() when the form is open resets the current field "select2" values to the default values
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Yes, I think that is what it is supposed to do. Why are you doing an ajax reload while the user edits data?
I agree, but if this happens through setInterval
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
" ... but if this happens through setInterval" ... then you can turn it off on "open" of the form and turn it back on on "close" of the form.
https://editor.datatables.net/reference/event/open
https://editor.datatables.net/reference/event/closed
https://editor.datatables.net/reference/event/close
How to stop the interval execution:
https://www.bitdegree.org/learn/javascript-setinterval#stopping
rf1234, thank you very much
The working code that Roland helped me with