Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/shibui-2380' into featur…
Browse files Browse the repository at this point in the history
…e/shibui-2380
  • Loading branch information
chasegawa committed Oct 21, 2022
2 parents 03ca5bb + 1f63ada commit d85769f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ui/src/app/form/component/AddButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import Button from "react-bootstrap/Button";
import Translate from "../../i18n/components/translate";

const AddButton = ({className, ...props}) => (
<>
<Button {...props} variant="success" className={`array-add-button ${ className }`} size="sm">
<Translate value="action.add" />&nbsp;
<FontAwesomeIcon icon={faPlus} />
</Button>
</>
);
export default AddButton;
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ const StringListWithDefaultField = ({
required={props.required}
/>}
<AddButton
id={`array-field-addbtn-${props.idSchema.$id}`}
className="array-item-add mx-2"
onClick={onAdd}
disabled={props.disabled || props.readonly}
Expand Down
3 changes: 3 additions & 0 deletions ui/src/app/form/component/templates/ArrayFieldTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,10 @@ const DefaultFixedArrayFieldTemplate = (props) => {
title={props.uiSchema["ui:title"] || props.title}
required={props.required}
/>
hi there
{props.canAdd && (
<AddButton
id={`array-field-addbtn-${props.idSchema.$id}`}
className="array-item-add"
onClick={props.onAddClick}
disabled={props.disabled || props.readonly}
Expand Down Expand Up @@ -266,6 +268,7 @@ const DefaultNormalArrayFieldTemplate = (props) => {
/>}
{props.canAdd && (
<AddButton
id={`array-field-addbtn-${props.idSchema.$id}`}
className="array-item-add mx-2"
onClick={props.onAddClick}
disabled={props.disabled || props.readonly}
Expand Down

0 comments on commit d85769f

Please sign in to comment.