fix(ui): prevent parameter editor from resetting when props update (fixes #14351) #21625
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #14351
Explanation
The UI is continually making calls to
appdetails
andsyncwindows
when viewing an Application or its settings.When this happens it updates the input passed to the
<DataLoader />
inside theapplication-parameters
component, which causes it to re-run itsload
function. Without settingnoLoaderOnInputChange
totrue
, this causes the component to renderloading...
momentarily every time the input prop changes, before switching back to what was there before once the load function completes.Because the component has an "edit" mode, this can be problematic as the switch to "loading..." and back causes the component to reset to its base state, losing the change the user might be in the middle of making. I believe this is what is being described in the referenced issue, and our users have the same problem.
The PR simply sets
noLoaderOnInputChange
to true, as seems to be done in a handful of other UI components elsewhere in the app. From testing locally this appears to fix the issue*.Checklist:
Optional. My organization is added to USERS.md.