Skip to content

Commit

Permalink
fix: remove multiple console.log and fix reference to undefined `su…
Browse files Browse the repository at this point in the history
…bmitButtonLabel` (#12)
  • Loading branch information
pgoforth authored Sep 21, 2024
1 parent 1e082e4 commit 93e7415
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/form/src/json-schema-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,14 +352,12 @@ export class Jsf extends LitElement {

/* When user hit "Enter" while in some adequate inputs */
protected _handleKeydown(event: KeyboardEvent) {
console.log('cccccccccccccc');
const hasModifier =
event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;

if (event.key === 'Enter' && !hasModifier) {
setTimeout(() => {
if (!event.defaultPrevented && !event.isComposing) {
console.log({ event });
const form = this.#formRef.value!;
// const valid = form.reportValidity();
let valid = true;
Expand Down Expand Up @@ -398,7 +396,7 @@ export class Jsf extends LitElement {
#submit = () => {
const options: Widgets['submit'] = {
id: '__submit_button',
label: this.submitButtonLabel,
label: this.submitButtonText,
};
const error = 'Missing submit widget.';
return (
Expand All @@ -421,7 +419,6 @@ export class Jsf extends LitElement {
${ref(this.#formRef)}
part="base"
@submit=${(event: Event) => {
console.log('hey');
event.preventDefault();
const valid = (event.target as HTMLFormElement).reportValidity();
Expand Down

0 comments on commit 93e7415

Please sign in to comment.