Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Form): Expression field lose its values
Currently, using the following order works: 1. Add a `setHeaders` step 2. Configure the `name` property 3. Configure the `expression` field Now, it's not the case when going in the opposite direction. This happens because when starting with an empty `setHeaders` step, both the `Form` and the `ExpressionField` don't have any information and they start with an empty object. After configuring the `ExpressionField`, the `Form` still doesn't know about the recently configured expression, and since the `Form` operates in an entire-object-update fashion, it removes the already configured `expression`. The opposite doesn't happen because the `ExpressionField` checks the latest definition before updating it. The workaround is to perform single-property operations in the `Form`, this way, the `Form` works in an additive way, preserving what was already set. A more robust solution would be to perform the processor parsing before opening the `Form`, so we can incorporate the `ExpressionField` component into the `autoform` context. fix: KaotoIO#722
- Loading branch information