From 1d5cd4b6b32bf37896012d8763564c68c21c381e Mon Sep 17 00:00:00 2001 From: giuliana Date: Thu, 23 Jan 2025 11:46:33 +0000 Subject: [PATCH 1/5] feat(select): add required prop --- core/src/components/select/select.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/src/components/select/select.tsx b/core/src/components/select/select.tsx index 3b4ef84f26f..b9495115d11 100644 --- a/core/src/components/select/select.tsx +++ b/core/src/components/select/select.tsx @@ -196,6 +196,11 @@ export class Select implements ComponentInterface { */ @Prop({ mutable: true }) value?: any | null; + /** + * If `true`, the user must fill in a value before submitting a form. + */ + @Prop() required = false; + /** * Emitted when the value has changed. * @@ -974,7 +979,7 @@ export class Select implements ComponentInterface { } private renderListbox() { - const { disabled, inputId, isExpanded } = this; + const { disabled, inputId, isExpanded, required } = this; return (