Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add overridable wrapper to CreatibutorsModal role SelectField #1759

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,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 @@ -580,7 +581,8 @@ export class CreatibutorsModal extends Component {
{(_get(values, typeFieldPath) === CREATIBUTOR_TYPE.ORGANIZATION ||
(showPersonForm &&
_get(values, typeFieldPath) === CREATIBUTOR_TYPE.PERSON)) && (
<SelectField
<Overridable
id="InvenioRdmRecords.Deposit.CreatibutorsModalRoleSelectField.Container"
fieldPath={roleFieldPath}
label={i18next.t("Role")}
options={roleOptions}
Expand All @@ -589,7 +591,18 @@ export class CreatibutorsModal extends Component {
required={!this.isCreator()}
optimized
scrolling
/>
>
<SelectField
fieldPath={roleFieldPath}
label={i18next.t("Role")}
options={roleOptions}
placeholder={i18next.t("Select role")}
{...(this.isCreator() && { clearable: true })}
required={!this.isCreator()}
optimized
scrolling
/>
</Overridable>
)}
</Form>
</Modal.Content>
Expand Down
Loading