fix(DeesFormSubmit): Make form submit robust by locating nearest dees-form via closest(); add local CLAUDE settings
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@design.estate/dees-catalog',
|
||||
version: '1.11.1',
|
||||
version: '1.11.2',
|
||||
description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
|
||||
}
|
||||
|
@@ -57,9 +57,10 @@ export class DeesFormSubmit extends DeesElement {
|
||||
if (this.disabled) {
|
||||
return;
|
||||
}
|
||||
const parentElement: DeesForm = this.parentElement as DeesForm;
|
||||
if (parentElement && parentElement.gatherAndDispatch) {
|
||||
parentElement.gatherAndDispatch();
|
||||
// Walk up the DOM tree to find the nearest dees-form element
|
||||
const parentFormElement = this.closest('dees-form') as DeesForm;
|
||||
if (parentFormElement && parentFormElement.gatherAndDispatch) {
|
||||
parentFormElement.gatherAndDispatch();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user