Skip to content

Commit

Permalink
set value when modal is submitted
Browse files Browse the repository at this point in the history
  • Loading branch information
madsrasmussen committed Dec 13, 2023
1 parent cdb7810 commit c3d4856
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ export class UmbSectionPickerModalElement extends UmbModalBaseElement<
'umbSectionsObserver';
}

#submit() {
this.value = { selection: this.#selectionManager.getSelection() };
this._submitModal();
}

render() {
return html`
<umb-body-layout headline="Select sections">
Expand All @@ -49,7 +54,7 @@ export class UmbSectionPickerModalElement extends UmbModalBaseElement<
</uui-box>
<div slot="actions">
<uui-button label="Close" @click=${this._rejectModal}></uui-button>
<uui-button label="Submit" look="primary" color="positive" @click=${this._submitModal}></uui-button>
<uui-button label="Submit" look="primary" color="positive" @click=${this.#submit}></uui-button>
</div>
</umb-body-layout>
`;
Expand Down

0 comments on commit c3d4856

Please sign in to comment.