Skip to content

Commit 9770be1

Browse files
HedwigJDoetsgjulivan
authored andcommitted
fix: rename referenceId to id in ValidationAlertProps
1 parent 5a034fd commit 9770be1

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

packages/pluggableWidgets/combobox-web/src/components/ComboboxWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const ComboboxWrapper = forwardRef(
5757
</div>
5858
)}
5959
</div>
60-
{validation && <ValidationAlert referenceId={errorId}>{validation}</ValidationAlert>}
60+
{validation && <ValidationAlert id={errorId}>{validation}</ValidationAlert>}
6161
</Fragment>
6262
);
6363
}

packages/shared/widget-plugin-component-kit/src/Alert.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,12 @@ export interface AlertProps {
1212
export interface ValidationAlertProps {
1313
children?: ReactNode;
1414
className?: string;
15-
referenceId?: string;
15+
id?: string;
1616
}
1717

1818
// cloning from https://gitlab.rnd.mendix.com/appdev/appdev/-/blob/master/client/src/widgets/web/helpers/Alert.tsx
19-
export const ValidationAlert = ({ className, children, referenceId }: ValidationAlertProps): ReactElement => (
20-
<Alert
21-
className={classNames("mx-validation-message", className)}
22-
bootstrapStyle="danger"
23-
role="alert"
24-
id={referenceId}
25-
>
19+
export const ValidationAlert = ({ className, children, id }: ValidationAlertProps): ReactElement => (
20+
<Alert className={classNames("mx-validation-message", className)} bootstrapStyle="danger" role="alert" id={id}>
2621
{children}
2722
</Alert>
2823
);

0 commit comments

Comments
 (0)