demarches-normaliennes/app/javascript/new_design
Pierre de La Morinerie 96037069ff autosave: remove the repetition row after deletion
Before, when autosaving a draft, removing a repetition row would
send `_destroy` inputs to the controller – but not remove the row
from the DOM. This led to the `_destroy` inputs being sent again
on the next autosave request, which made the controller raise
(because the row fields were already deleted before).

To fix this, we let the controller response remove the deleted
row(s) from the DOM.

Doing it using a controller response avoids the need to keep track
of operations on the Javascript side: the controller can easily
know which row was just deleted, and emit the relevant changes for
the DOM. This keeps the autosave requests robust: even if a request
is skipped (e.g. because of a network interruption), the next request
will still contain the relevant informations to succeed, and not let the
form in an unstable state.

Fix #5470
2020-08-25 14:39:34 +02:00
..
champs autosave: remove the repetition row after deletion 2020-08-25 14:39:34 +02:00
dossiers autosave: remove the repetition row after deletion 2020-08-25 14:39:34 +02:00
avis.js [fix #2969] use JS replace semicolon by comma in the list email 2018-12-03 12:59:40 +01:00
dropdown.js fix new prettier defaults 2020-05-12 18:18:37 +02:00
form-validation.js Refactor form validation helpers 2018-10-10 14:55:28 +02:00
messagerie.js Run load scripts after ujs responces 2019-08-13 17:03:55 +01:00
procedure-context.js Run load scripts after ujs responces 2019-08-13 17:03:55 +01:00
procedure-form.js procedure: make the layout more similar to the mockup 2019-10-31 10:27:19 +01:00
select2.js fix new prettier defaults 2020-05-12 18:18:37 +02:00
spinner.js Use @utils instead of jQuery 2018-10-10 14:55:28 +02:00
state-button.js implementation du systeme de PJ de motivation 2019-05-07 08:54:29 +02:00
support.js Run load scripts after ujs responces 2019-08-13 17:03:55 +01:00
user-sign_up.js sign_up: fix suggestions error when navigating away 2019-12-19 17:45:14 +01:00