Skip to content

Commit

Permalink
refactor(controller): removing console.log lines
Browse files Browse the repository at this point in the history
  • Loading branch information
korgon committed Dec 5, 2024
1 parent 6980fce commit 0884a3b
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ export class AutocompleteController extends AbstractController {
handlers = {
input: {
enterKey: async (e: KeyboardEvent): Promise<boolean | undefined> => {
console.log('enter key handler...');
if (e.keyCode == KEY_ENTER) {
const input = e.target as HTMLInputElement;
let actionUrl = this.store.services.urlManager;
Expand Down Expand Up @@ -435,7 +434,6 @@ export class AutocompleteController extends AbstractController {
}

async bind(): Promise<void> {
console.log('binding???');
if (!this.initialized) {
await this.init();
}
Expand All @@ -444,7 +442,6 @@ export class AutocompleteController extends AbstractController {

const inputs: NodeListOf<HTMLInputElement> = document.querySelectorAll(this.config.selector);
inputs.forEach((input) => {
console.log('binding input???', input);
input.setAttribute('spellcheck', 'false');
input.setAttribute('autocomplete', 'off');
input.setAttribute('autocorrect', 'off');
Expand All @@ -464,9 +461,7 @@ export class AutocompleteController extends AbstractController {
const form = input.form;
let formActionUrl: string | undefined;

console.log('binding action???', this.config.action);
if (this.config.action) {
console.log('binding action???');
this.config.settings?.bind?.submit && input.addEventListener('keydown', this.handlers.input.enterKey);
formActionUrl = this.config.action;
} else if (form) {
Expand Down

0 comments on commit 0884a3b

Please sign in to comment.