Skip to content

Commit 32df2a7

Browse files
committedFeb 17, 2025
UX: add section feedback banners
1 parent bec3fb9 commit 32df2a7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
 

‎src/lib/forms/AccordionField.js

+12
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ import { Field, FastField } from "formik";
1111
import { Accordion, Container, Icon } from "semantic-ui-react";
1212
import _omit from "lodash/omit";
1313
import _get from "lodash/get";
14+
import Overridable from "react-overridable";
15+
import {
16+
FormSectionFeedback,
17+
} from "@js/invenio_rdm_records";
1418

1519
export class AccordionField extends Component {
1620
hasError(errors, initialValues = undefined, values = undefined) {
@@ -33,6 +37,8 @@ export class AccordionField extends Component {
3337
form: { errors, status, initialErrors, initialValues, values },
3438
} = props;
3539

40+
const { includesPaths } = this.props;
41+
3642
// eslint-disable-next-line no-unused-vars
3743
const { label, children, active, ...ui } = this.props;
3844
const uiProps = _omit({ ...ui }, ["optimized", "includesPaths"]);
@@ -80,6 +86,12 @@ export class AccordionField extends Component {
8086
{panel.title.content}
8187
<Icon name="angle down" />
8288
</Accordion.Title>
89+
<Overridable
90+
id="InvenioAppRdm.AccordionField.FormFeedback.container"
91+
fieldPath="message"
92+
>
93+
<FormSectionFeedback fieldPath="message" includesPaths={includesPaths} />
94+
</Overridable>
8395
<Accordion.Content active={activeIndex === index}>
8496
{panel.content.content}
8597
</Accordion.Content>

0 commit comments

Comments
 (0)