Skip to content

Commit

Permalink
feat(select): make required asterisk optional
Browse files Browse the repository at this point in the history
  • Loading branch information
npeters-dev authored and Nino Peters committed May 22, 2024
1 parent be5bb43 commit 8f194a5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions select/internal/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ export abstract class Select extends selectBaseClass {
*/
@property() label = '';

/**
* Disables the asterisk on the floating label, when the select is
* required.
*/
@property({type: Boolean, attribute: 'no-asterisk'}) noAsterisk = false;

/**
* Conveys additional information below the select, such as how it should
* be used.
Expand Down Expand Up @@ -395,6 +401,7 @@ export abstract class Select extends selectBaseClass {
aria-controls="listbox"
class="field"
label=${this.label}
?no-asterisk=${this.noAsterisk}
.focused=${this.focused || this.open}
.populated=${!!this.displayText}
.disabled=${this.disabled}
Expand Down

0 comments on commit 8f194a5

Please sign in to comment.