Skip to content

feat(select): add required prop #30155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Feb 4, 2025
Prev Previous commit
Next Next commit
feat(select): change required prop description
  • Loading branch information
OS-giulianasilva committed Jan 24, 2025
commit d1bc696f9f95859a848d085625a937f604c209d6
4 changes: 2 additions & 2 deletions core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2809,7 +2809,7 @@ export namespace Components {
*/
"placeholder"?: string;
/**
* If `true`, the user must fill in a value before submitting a form.
* If true, screen readers will announce it as a required field. This property works only for accessibility purposes, it will not prevent the form from submitting if the value is invalid.
*/
"required": boolean;
/**
Expand Down Expand Up @@ -7645,7 +7645,7 @@ declare namespace LocalJSX {
*/
"placeholder"?: string;
/**
* If `true`, the user must fill in a value before submitting a form.
* If true, screen readers will announce it as a required field. This property works only for accessibility purposes, it will not prevent the form from submitting if the value is invalid.
*/
"required"?: boolean;
/**
Expand Down
4 changes: 3 additions & 1 deletion core/src/components/select/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ export class Select implements ComponentInterface {
@Prop({ mutable: true }) value?: any | null;

/**
* If `true`, the user must fill in a value before submitting a form.
* If true, screen readers will announce it as a required field. This property
* works only for accessibility purposes, it will not prevent the form from
* submitting if the value is invalid.
*/
@Prop() required = false;

Expand Down