Skip to content

[v10.2.10] Unable to trigger autocomplete due to #442 #492

Description

@QuentiumYT
  • System Information

    • Browser type and version: Brave
    • OS type and version: Linux Mint 22.3
    • WINDOWS: be sure to indicate which terminal you're using -- (i.e., cmd.exe, powershell, git- bash, cygwin, Ubuntu via windows subsystem for linux, etc...): gnome terminal
    • Node version (IF applicable): NA
      • Any error messages that may be in the console where you ran npm start: None
    • Any error messages in the JS console: Uncaught (in promise) TypeError: i.src(...).then is not a function
  • Describe the bug
    Regression caused by data.src.constructor.name === "AsyncFunction" fails in a transpiled environment #442, when I rollback to 10.2.9 it works like before. It might be interesting to dig again into it :/

  • To Reproduce
    Steps to reproduce the behavior:

new autoComplete({
        selector: '#site-search',
        placeHolder: 'Rechercher un site',
        diacritics: true,
        data: {
          src: () =>
            newSites.map((site) => ({
              label: site.label_site,
              value: site.id_site,
            })),
          keys: ['label'],
        },
  • Expected behavior
    It should work like before

  • Screenshots or GIF's (optional, but HIGHLY RECOMMENDED)
    Every time I type in the input, this error is triggered:

Uncaught (in promise) TypeError: i.src(...).then is not a function
    at autoComplete.min.js:1:3273
    at new Promise (<anonymous>)
    at autoComplete.min.js:1:3206
    at new Promise (<anonymous>)
    at d (autoComplete.min.js:1:3137)
    at autoComplete.min.js:1:5851
    at new Promise (<anonymous>)
    at k (autoComplete.min.js:1:5620)
    at e (autoComplete.min.js:1:6547)
    at autoComplete.min.js:1:6625```

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingv10.3.0Planned for v10.3.0

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions