use data attr to get the document type key
This commit is contained in:
@@ -37,7 +37,8 @@ export class UmbAllowedDocumentTypesModalElement extends UmbModalBaseElement<
|
||||
#onClick(event: PointerEvent) {
|
||||
event.stopPropagation();
|
||||
const target = event.target as HTMLButtonElement;
|
||||
const documentTypeKey = target.value;
|
||||
const documentTypeKey = target.dataset.key;
|
||||
if (!documentTypeKey) throw new Error('No document type key found');
|
||||
this.modalHandler?.submit({ documentTypeKey });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user