Skip to content

Commit

Permalink
Fix element custom options source (#334)
Browse files Browse the repository at this point in the history
* Fix element custom options

* Update CHANGELOG.md

* Update CHANGELOG.md
  • Loading branch information
mikhail-vl authored Jan 10, 2024
1 parent 345e4c8 commit d26cdca
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Change Log

## 3.6.0 (IN PROGRESS)
## 3.6.0 (2023-01-10)

### Features / Enhancements

- Add backend service to custom code (#331)
- Add support for file base64 encoding in payload (#331)
- Add Context parameter to Payload (#331)

### Bugfixes

- Fix element custom options source (#334)

## 3.5.0 (2023-01-04)

### Features / Enhancements
Expand Down
33 changes: 16 additions & 17 deletions src/components/ElementEditor/ElementEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -547,23 +547,22 @@ export const ElementEditor: React.FC<Props> = ({
/>
</Field>
)}
{element.optionsSource === OptionsSource.CUSTOM ||
(!element.optionsSource && (
<div className={styles.optionsContainer} data-testid={TEST_IDS.formElementsEditor.options}>
<ElementOptionsEditor
options={element.options}
onChange={(options) =>
onChange({
...element,
options,
})
}
onChangeItem={(updated, original, checkConflict) => {
return onChangeOption(element, updated, original, checkConflict);
}}
/>
</div>
))}
{(element.optionsSource === OptionsSource.CUSTOM || !element.optionsSource) && (
<div className={styles.optionsContainer} data-testid={TEST_IDS.formElementsEditor.options}>
<ElementOptionsEditor
options={element.options}
onChange={(options) =>
onChange({
...element,
options,
})
}
onChangeItem={(updated, original, checkConflict) => {
return onChangeOption(element, updated, original, checkConflict);
}}
/>
</div>
)}
</>
)}

Expand Down

0 comments on commit d26cdca

Please sign in to comment.