Repository navigation
Conversation
added 2 commits
October 16, 2026 13:57
UpdateValueAsync notified the parent but never updated the context's Value. Since InputsTab started reusing editor contexts (via commit 5bc18fd), editors like Cases were reloading the stale value on re-render. This does a Set Value before notifying (same as UpdateExpressionAsync already does). Fixes elsa-workflows#1129
Contributor
|
This PR does not match any of the 1 configured review trigger rule. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Purpose
Fix input editors (e.g. Switch Cases) showing stale values after an edit:
DisplayInputEditorContext.UpdateValueAsyncnow updatesValuebefore notifying.Fixes #1129
Scope
Select one primary concern:
Description
Problem
UpdateValueAsynccalledOnValueChangedbut never updated the context'sValue, unlikeUpdateExpressionAsync. Since #670,InputsTabreuses editor contexts across value changes, so editors that re-read the context inOnParametersSetreload the stale value when the parent re-renders. In the Cases editor, a committed row edit goes back to the old values until the page is refreshed or the property tabs are switched.HttpStatusCodes,InputPickerandVariablePickeruse the same method.Solution
Set
Valuebefore callingOnValueChanged, matchingUpdateExpressionAsync. Added unit tests inElsa.Studio.Core.Testscovering both the update and its ordering relative to the notification.Verification
Steps:
dotnet test src/framework/Elsa.Studio.Core.Tests --filter DisplayInputEditorContextTests.Expected outcome:
The Cases table shows the edited values right away, without a refresh or tab switch, and both tests pass.
Checklist
Summary by CodeRabbit
Bug Fixes
Tests