diff --git a/src/designer/elsa-workflows-studio/src/components/editors/properties/elsa-dropdown-property/elsa-dropdown-property.tsx b/src/designer/elsa-workflows-studio/src/components/editors/properties/elsa-dropdown-property/elsa-dropdown-property.tsx index 8edb4d9810..de8cc17e51 100644 --- a/src/designer/elsa-workflows-studio/src/components/editors/properties/elsa-dropdown-property/elsa-dropdown-property.tsx +++ b/src/designer/elsa-workflows-studio/src/components/editors/properties/elsa-dropdown-property/elsa-dropdown-property.tsx @@ -108,8 +108,11 @@ export class ElsaDropdownProperty { this.currentValue = optionIsObject ? firstOption.value : firstOption.toString(); } - // Dispatch event to the next dependent input, if any. - currentSelectList.dispatchEvent(new Event("change")); + // Dispatch change event so that dependent dropdown elements refresh. + // Do this after the current component has re-rendered, otherwise the current value will be sent to the backend, which is outdated. + requestAnimationFrame(() => { + currentSelectList.dispatchEvent(new Event("change")); + }); } private awaitElement = async selector => {