fix(core): update

This commit is contained in:
2023-09-01 14:21:15 +02:00
parent 362bef15e3
commit 566a7ce148
2 changed files with 14 additions and 1 deletions

View File

@ -166,6 +166,19 @@ export class DeesForm extends DeesElement {
submitButton.text = textStateArg;
}
/**
* resets the form
*/
reset() {
const inputChildren = this.getFormElements();
const submitButton = this.getSubmitButton();
for (const inputChild of inputChildren) {
inputChild.value = null;
}
this.setStatus('normal', 'Submit');
}
public async addBehaviours() {
// Use event delegation
this.addEventListener('keydown', (event: KeyboardEvent) => {