Skip to content

Commit

Permalink
Add Overridable wrapper to role SelectField
Browse files Browse the repository at this point in the history
  • Loading branch information
mkloeppe committed Jul 3, 2024
1 parent 46ab124 commit d91abc8
Showing 1 changed file with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import * as Yup from "yup";
import { AffiliationsField } from "./../AffiliationsField";
import { CreatibutorsIdentifiers } from "./CreatibutorsIdentifiers";
import { CREATIBUTOR_TYPE } from "./type";
import Overridable from "react-overridable";

const ModalActions = {
ADD: "add",
Expand Down Expand Up @@ -679,16 +680,18 @@ export class CreatibutorsModal extends Component {
(showPersonForm &&
_get(values, typeFieldPath) === CREATIBUTOR_TYPE.PERSON)) && (
<div>
<SelectField
fieldPath={roleFieldPath}
label={i18next.t("Role")}
options={roleOptions}
placeholder={i18next.t("Select role")}
{...(this.isCreator() && { clearable: true })}
required={!this.isCreator()}
optimized
scrolling
/>
<Overridable id="InvenioRdmRecords.Deposit.CreatibutorsModalRoleSelectField.Container">
<SelectField
fieldPath={roleFieldPath}
label={i18next.t("Role")}
options={roleOptions}
placeholder={i18next.t("Select role")}
{...(this.isCreator() && { clearable: true })}
required={!this.isCreator()}
optimized
scrolling
/>
</Overridable>
</div>
)}
</Form>
Expand Down

0 comments on commit d91abc8

Please sign in to comment.