- Issue created by @jessebaker
- First commit to issue fork.
- πΊπΈUnited States bnjmnm Ann Arbor, MI
The two PATCH requests to component-instance is due to the endpoint set to
forceRefresh: true
, which was added to fix the issue of vanilla Drupal behaviors not re-running if a component form is revisited. (the most common symptom was leaving then re-loading a component with a media library widget would result in the widget JS not working)Setting
forceRefresh: true
provides a redux-cached version of the form until the new version is available, then the updated data (including selectors necessary for Drupal Ajax to work) replaces it.. Apparently this setting also makes additional, unnecessary requests. In the MR I updated the criteria to force a refresh if- The query string changed (which is very expected)
- The last query string came from a different component.
Some manual testing is needed to ensure there aren't scenarios where a re-opening of a props form doesn't force a refetch.
-
jessebaker β
committed 03880eb4 on 0.x authored by
bnjmnm β
Issue #3529616 by bnjmnm: Changing a prop value makes 3 calls to the...
-
jessebaker β
committed 03880eb4 on 0.x authored by
bnjmnm β