move autocomplete controllers

This commit is contained in:
Pete Matsyburka committed 2024-03-23 23:52:50 +02:00
1 parent 077eab7005
commit 8bef75e570
7 files changed
+51 -55

No files matched your search

@@ -20,7 +20,7 @@ export default class extends HTMLElement {
fetch = (text, resolve) => {
const queryParams = new URLSearchParams({ q: text })
fetch('/api/template_folders_autocomplete?' + queryParams).then(async (resp) => {
fetch('/template_folders_autocomplete?' + queryParams).then(async (resp) => {
const items = await resp.json()
resolve(items)
@@ -40,7 +40,7 @@ export default class extends HTMLElement {
if (q) {
const queryParams = new URLSearchParams({ q, field: this.dataset.field })
this.currentFetch ||= fetch('/api/submitters_autocomplete?' + queryParams)
this.currentFetch ||= fetch('/submitters_autocomplete?' + queryParams)
this.currentFetch.then(async (resp) => {
const items = await resp.json()