Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #1336
Closed
Open
Issue created Jan 28, 2012 by Administrator@rootContributor

Add remote sources support for typeahead

Created by: marcboeker

Hi Mark,

the new typeahead component is awesome. But I often have to implement an autocomplete that is fetching data from a remote source. Would it be possible to add a callback, that I can use to query the remote server and return a set of items that match the entered query?

function(query) {
    // Do some fetching and return an array of items.
}

The jQuery UI autocompleter offers returning an array of objects. This is very helpful, as you would often like to display a human friendly title to the user and set an ugly ID in the background as the field's value.

[{title: 'Look at me', value: '12345xyz'}, {title: 'Foo Bar', value: '654321abc'}]

I know, this increases the complexity of the typeahead component, but makes it on the other side very useful.

Thanks Marc

Assignee
Assign to
Time tracking