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 authored and SarahW91 committed Sep 16, 2024
1 parent a031711 commit ecbd94b
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 ecbd94b

Please sign in to comment.