Skip to content

Commit 8455756

Browse files
authored
fix(ErrorWrapper): update error wrapper styles for select and multiselect (#125)
1 parent f330a0b commit 8455756

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

src/lib/kit/components/ErrorWrapper/ErrorWrapper.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
.g-select:focus:not(.#{$ns}error-wrapper-ignore),
1515
.g-select:not(.#{$ns}error-wrapper-ignore) .g-select-control::before,
1616
.g-select:hover:not(.#{$ns}error-wrapper-ignore) .g-select-control_open::before,
17+
.g-select:not(.#{$ns}error-wrapper-ignore) .g-select-control__button::before,
1718
.g-text-area__content:not(.#{$ns}error-wrapper-ignore),
1819
.g-text-area__content:hover:not(.#{$ns}error-wrapper-ignore),
1920
.yc-text-input_view_normal:not(.#{$ns}error-wrapper-ignore) .yc-text-input__control,

src/lib/kit/components/Layouts/Row/Row.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ const RowBase = <T extends FieldValue, S extends Spec>({
6161
<ErrorWrapper
6262
name={name}
6363
meta={meta}
64-
withoutChildErrorStyles={isArraySpec(spec) || isObjectSpec(spec)}
64+
withoutChildErrorStyles={
65+
// TODO: remove condition spec.viewSpec.type !== 'select'
66+
(isArraySpec(spec) && spec.viewSpec.type !== 'select') ||
67+
isObjectSpec(spec)
68+
}
6569
className={b('error-wrapper')}
6670
>
6771
{children}

src/lib/kit/components/Layouts/Row2/Row2.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ export const Row2 = <T extends FieldValue, S extends Spec>({
4242
<ErrorWrapper
4343
name={name}
4444
meta={meta}
45-
withoutChildErrorStyles={isArraySpec(spec) || isObjectSpec(spec)}
45+
withoutChildErrorStyles={
46+
// TODO: remove condition spec.viewSpec.type !== 'select'
47+
(isArraySpec(spec) && spec.viewSpec.type !== 'select') ||
48+
isObjectSpec(spec)
49+
}
4650
>
4751
{children}
4852
</ErrorWrapper>

src/lib/kit/components/Layouts/Transparent/Transparent.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,14 @@ export const Transparent = <T extends FieldValue, S extends Spec>({
5555
'without-max-width': arrOrObjFlag,
5656
})}
5757
>
58-
<ErrorWrapper name={name} meta={meta} withoutChildErrorStyles={arrOrObjFlag}>
58+
<ErrorWrapper
59+
name={name}
60+
meta={meta}
61+
withoutChildErrorStyles={
62+
// TODO: remove condition spec.viewSpec.type !== 'select'
63+
(isArraySpec(spec) && spec.viewSpec.type !== 'select') || isObjectSpec(spec)
64+
}
65+
>
5966
{children}
6067
</ErrorWrapper>
6168
{generateButton ? (

0 commit comments

Comments
 (0)