From 69abc87a07af85fb61a761b3717660c0d5c2b18d Mon Sep 17 00:00:00 2001 From: Filip Siderov Date: Wed, 19 Aug 2020 14:04:01 +0300 Subject: [PATCH] feat(ui5-select): introduce required property (#2116) --- packages/main/src/Select.hbs | 1 + packages/main/src/Select.js | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/packages/main/src/Select.hbs b/packages/main/src/Select.hbs index 2c2eb1aef632..45fc14a5e087 100644 --- a/packages/main/src/Select.hbs +++ b/packages/main/src/Select.hbs @@ -8,6 +8,7 @@ aria-labelledby="{{_id}}-label" aria-describedby="{{valueStateTextId}}" aria-disabled="{{isDisabled}}" + aria-required="{{required}}" @keydown="{{_onkeydown}}" @keyup="{{_onkeyup}}" @focusin="{{_onfocusin}}" diff --git a/packages/main/src/Select.js b/packages/main/src/Select.js index dddd39d9f82e..11cc28fd751d 100644 --- a/packages/main/src/Select.js +++ b/packages/main/src/Select.js @@ -145,6 +145,18 @@ const metadata = { defaultValue: ValueState.None, }, + /** + * Defines whether the ui5-select is required. + * + * @since 1.0.0-rc.9 + * @type {Boolean} + * @defaultvalue false + * @public + */ + required: { + type: Boolean, + }, + _text: { type: String, noAttribute: true,