Skip to content

Commit 7365dac

Browse files
committed
Displays the mandatory indicator on the property's uui-label
1 parent cfc5831 commit 7365dac

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/packages/core/property/property-layout/property-layout.element.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,28 @@ export class UmbPropertyLayoutElement extends UmbLitElement {
5151
public description = '';
5252

5353
/**
54-
* @description Make the property appear invalid
54+
* @description Make the property appear invalid.
5555
* @type {boolean}
5656
* @attr
5757
* @default undefined
5858
*/
5959
@property({ type: Boolean, reflect: true })
6060
public invalid?: boolean;
6161

62+
/**
63+
* @description Display a mandatory indicator.
64+
* @type {boolean}
65+
* @attr
66+
* @default false
67+
*/
68+
@property({ type: Boolean, reflect: true })
69+
public mandatory?: boolean;
70+
6271
override render() {
6372
// TODO: Only show alias on label if user has access to DocumentType within settings:
6473
return html`
6574
<div id="headerColumn">
66-
<uui-label id="label" title=${this.alias}>
75+
<uui-label id="label" title=${this.alias} ?required=${this.mandatory}>
6776
${this.localize.string(this.label)}
6877
${when(this.invalid, () => html`<uui-badge color="danger" attention>!</uui-badge>`)}
6978
</uui-label>

0 commit comments

Comments
 (0)