Skip to content

Commit

Permalink
using webstorm
Browse files Browse the repository at this point in the history
  • Loading branch information
bahrus committed Oct 26, 2024
1 parent 77b532c commit c3682ce
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
15 changes: 14 additions & 1 deletion be-reformable.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class BeReformable extends BE {
propDefaults: {
updateOn: 'input',
updateCnt: 0,
nudge: false,
},
propInfo:{
baseLink: {},
Expand Down Expand Up @@ -114,7 +115,19 @@ class BeReformable extends BE {
this.#abortController = new AbortController();
const {updateOn, enhancedElement} = self;
enhancedElement.addEventListener(updateOn, this, {signal: this.#abortController.signal});
this.handleEvent();
if(updateOn === 'submit'){
const {nudge} = self;
if(nudge){
const submitButtons = Array.from(enhancedElement.querySelectorAll('button[type="submit"]'));
for(const sb of submitButtons){
(await import('trans-render/lib/nudge.js')).nudge(sb);
}

}
}else{
this.handleEvent();
}

return /** @type {PAP} */({
resolved: true
});
Expand Down
2 changes: 1 addition & 1 deletion ts-refs
Submodule ts-refs updated from 8107a6 to 34ca9e

0 comments on commit c3682ce

Please sign in to comment.