Add required prop to select

This commit is contained in:
Cory LaViska
2020-08-25 09:30:28 -04:00
parent 26d04a9b2e
commit cd0d01f5e5
2 changed files with 12 additions and 0 deletions

8
src/components.d.ts vendored
View File

@@ -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.
*/

View File

@@ -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}