Skip to content

Commit edadd7e

Browse files
committed
fix(common): add submitError to multiplechoidcelist
1 parent 667f733 commit edadd7e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/common/src/multiple-choice-list.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ const SingleCheckbox = (props) => {
1313
const MultipleChoiceList = (props) => {
1414
const { Wrapper, Checkbox, label, isRequired, helperText, meta, input, options, isDisabled, isReadOnly, description, ...rest } = useFieldApi(props);
1515

16-
const { error, touched } = meta;
17-
const showError = touched && error;
16+
const { error, touched, submitError } = meta;
17+
const showError = touched && (error || submitError);
1818

1919
return (
2020
<Wrapper
@@ -25,7 +25,7 @@ const MultipleChoiceList = (props) => {
2525
meta={meta}
2626
description={description}
2727
rest={rest}
28-
error={error}
28+
error={error || submitError}
2929
name={input.name}
3030
>
3131
{options.map((option) => (

0 commit comments

Comments
 (0)