mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 12:09:26 +00:00
Add required prop to select
This commit is contained in:
8
src/components.d.ts
vendored
8
src/components.d.ts
vendored
@@ -766,6 +766,10 @@ export namespace Components {
|
||||
* The select's placeholder text.
|
||||
*/
|
||||
"placeholder": string;
|
||||
/**
|
||||
* The select's required attribute.
|
||||
*/
|
||||
"required": boolean;
|
||||
/**
|
||||
* The select's size.
|
||||
*/
|
||||
@@ -2132,6 +2136,10 @@ declare namespace LocalJSX {
|
||||
* The select's placeholder text.
|
||||
*/
|
||||
"placeholder"?: string;
|
||||
/**
|
||||
* The select's required attribute.
|
||||
*/
|
||||
"required"?: boolean;
|
||||
/**
|
||||
* The select's size.
|
||||
*/
|
||||
|
||||
@@ -74,6 +74,9 @@ export class Select {
|
||||
/** The select's label. */
|
||||
@Prop() label = '';
|
||||
|
||||
/** The select's required attribute. */
|
||||
@Prop() required: boolean;
|
||||
|
||||
/** Set to true to indicate that the user input is valid. */
|
||||
@Prop() valid = false;
|
||||
|
||||
@@ -350,6 +353,7 @@ export class Select {
|
||||
size={this.size}
|
||||
valid={this.valid}
|
||||
invalid={this.invalid}
|
||||
required={this.required}
|
||||
aria-labelledby={this.labelId}
|
||||
aria-describedby={this.helpTextId}
|
||||
onSlFocus={this.handleFocus}
|
||||
|
||||
Reference in New Issue
Block a user