Skip to content

Commit

Permalink
Added label to default
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Jun 28, 2021
1 parent edb269b commit 554d345
Showing 1 changed file with 27 additions and 22 deletions.
49 changes: 27 additions & 22 deletions ui/src/app/form/component/fields/StringListWithDefaultField.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,29 +95,34 @@ const StringListWithDefaultField = ({
<div>
<Row className="">
<Col className="">
<div className="d-flex align-items-center mb-3">
{<ArrayFieldTitle
key={`array-field-title-${props.idSchema.$id}`}
TitleField={fields.TitleField}
idSchema={props.idSchema}
title={props.uiSchema["ui:title"] || props.title}
required={props.required}
/>}
<AddButton
className="array-item-add mx-2"
onClick={onAdd}
disabled={props.disabled || props.readonly}
/>
{(props.uiSchema["ui:description"] || schema.description) && (
<ArrayFieldDescription
key={`array-field-description-${props.idSchema.$id}`}
DescriptionField={fields.DescriptionField}
<div className="d-flex align-items-center justify-content-between mb-3">
<div className="d-flex align-items-center mb-3">
{<ArrayFieldTitle
key={`array-field-title-${props.idSchema.$id}`}
TitleField={fields.TitleField}
idSchema={props.idSchema}
description={
props.uiSchema["ui:description"] || schema.description
}
title={props.uiSchema["ui:title"] || props.title}
required={props.required}
/>}
<AddButton
className="array-item-add mx-2"
onClick={onAdd}
disabled={props.disabled || props.readonly}
/>
)}
{(props.uiSchema["ui:description"] || schema.description) && (
<ArrayFieldDescription
key={`array-field-description-${props.idSchema.$id}`}
DescriptionField={fields.DescriptionField}
idSchema={props.idSchema}
description={
props.uiSchema["ui:description"] || schema.description
}
/>
)}
</div>
<div className="mr-3">
Default
</div>
</div>
<div>
{items && items.map((p, idx) =>
Expand All @@ -127,7 +132,7 @@ const StringListWithDefaultField = ({
className="flex-grow-1"
value={p.value}
onChange={({ target: { value } }) => setValue(p, value)}></Form.Control>
<Form.Control custom name="default" type="radio" className="mx-4"
<Form.Control className="mx-4" custom name="default" type="radio"
checked={ p.default }
onChange={ () => setDefault(p) }
></Form.Control>
Expand Down

0 comments on commit 554d345

Please sign in to comment.