mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 22:42:32 -05:00
fix autocomplete
This commit is contained in:
1 parent
1ceac968b0
commit
c56f8cb38f
2 files changed
+2
-6
No files matched your search
@@ -45,11 +45,7 @@ export default class extends HTMLElement {
|
||||
this.currentFetch.then(async (resp) => {
|
||||
const items = await resp.json()
|
||||
|
||||
if (q.length < 3) {
|
||||
resolve(items.filter((e) => e[this.dataset.field].startsWith(q)))
|
||||
} else {
|
||||
resolve(items)
|
||||
}
|
||||
resolve(items)
|
||||
}).catch(() => {
|
||||
resolve([])
|
||||
}).finally(() => {
|
||||
|
||||
Reference in new issue
Block a user