Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

UI update: Fix typo for required input option (#739)

Rich Turner502d6df96425
diff --git a/ui/component/or-attribute-input/src/index.ts b/ui/component/or-attribute-input/src/index.ts
index ee3daa148..bd4c7ba1b 100644
--- a/ui/component/or-attribute-input/src/index.ts
+++ b/ui/component/or-attribute-input/src/index.ts
@@ -498,7 +498,7 @@ export class OrAttributeInput extends subscribe(manager)(translate(i18next)(LitE
@property({type: Boolean})
public readonly?: boolean;
- @property({type: Boolean})
+ @property({type: Boolean, attribute: true})
public required?: boolean;
@property()
diff --git a/ui/component/or-mwc-components/src/or-mwc-input.ts b/ui/component/or-mwc-components/src/or-mwc-input.ts
index ff31db636..9e134584f 100644
--- a/ui/component/or-mwc-components/src/or-mwc-input.ts
+++ b/ui/component/or-mwc-components/src/or-mwc-input.ts
@@ -382,7 +382,7 @@ export const getValueHolderInputTemplateProvider: ValueInputProviderGenerator =
const supportsLabel = inputTypeSupportsLabel(inputType);
const supportsSendButton = inputTypeSupportsButton(inputType);
const readonly = options.readonly;
- required = required || options.readonly;
+ required = required || options.required;
const comfortable = options.comfortable;
const resizeVertical = options.resizeVertical;
const inputRef: Ref<OrMwcInput> = createRef();