Skip to content

Commit

Permalink
🪟🐛 Connector builder UI: Fix inputs modal (#21643)
Browse files Browse the repository at this point in the history
* fix

* fix

Co-authored-by: Lake Mossman <[email protected]>
  • Loading branch information
Joe Reuter and lmossman authored Jan 24, 2023
1 parent 615bce0 commit 290b16b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ const InnerBuilderField: React.FC<BuilderFieldProps & FastFieldProps<unknown>> =

export const BuilderField: React.FC<BuilderFieldProps> = (props) => {
return (
<FastField name={props.path}>
// The key is set to enforce a re-render of the component if the type change, otherwise changes in props might not be reflected correctly
<FastField name={props.path} key={props.type}>
{({ field, form, meta }: FastFieldProps<unknown>) => (
<InnerBuilderField {...props} field={field} form={form} meta={meta} />
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,6 @@ const InputModal = ({
label={formatMessage({ id: "connectorBuilder.inputModal.default" })}
/>
)}
<BuilderField
path="definition.placeholder"
type="string"
optional
label={formatMessage({ id: "connectorBuilder.inputModal.placeholder" })}
tooltip={formatMessage({ id: "connectorBuilder.inputModal.placeholderTooltip" })}
/>
</>
) : (
<Callout className={styles.calloutContainer}>
Expand Down

0 comments on commit 290b16b

Please sign in to comment.