Skip to content

Commit

Permalink
fix(select): error with disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
aesteves60 authored and dpellier committed Jul 29, 2024
1 parent 35eca3b commit 19711e3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ $select-padding-right: $select-caret-size + ($select-base-padding * 2);
}

// Double class to give more weight than base override
:host(.ods-select.ods-select--error) {
:host(:not(.ods-select--disabled).ods-select.ods-select--error) {
.ts-control {
@include input.ods-input-error();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ export class OdsSelect {
<Host
class={{
'ods-select': true,
'ods-select--disabled': this.isDisabled,
'ods-select--dropdown-width-auto': this.dropdownWidth === 'auto',
'ods-select--error': this.hasError,
[`ods-select--border-rounded-${this.borderRounded}`]: true,
Expand Down
10 changes: 10 additions & 0 deletions packages/ods/src/components/select/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@
<option value="goldfish">Goldfish</option>
</ods-select>

<p>Disabled & Error</p>
<ods-select is-disabled has-error>
<option value="dog">Dog</option>
<option value="cat">Cat</option>
<option value="hamster">Hamster</option>
<option value="parrot">Parrot</option>
<option value="spider">Spider</option>
<option value="goldfish">Goldfish</option>
</ods-select>

<p>Has error</p>
<ods-select has-error>
<option value="dog">Dog</option>
Expand Down

0 comments on commit 19711e3

Please sign in to comment.