jquery / jquery/jquery-ui

Autocomplete should allow for the source to already have parameters

Open
#2,321 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs info
Dominant language
JavaScript
Stars
11.3k
Forks
5.2k
PR merge metrics
No merged PRs in 30d

Description

Concerning the Autocomplete widget source property, the documentation says:

a query string is added with a term field, which the server-side script should use for filtering the results. For example, if the source option is set to "https://example.com" and the user types foo, a GET request would be made to https://example.com?term=foo.

if the source already has parameters e.g.

 source: "http://tx.fhir.org/r4/ValueSet/$expand&url=http%3A%2F%2Fterminology.hl7.org%2FValueSet%2Fv2-0006&_format=jquery",

The string appended is still ?term={x}. If there is already a ? in the source URL, &term={x} should be appended

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the jQuery UI Autocomplete widget source and its documentation for the source option. Reproduce a request when the source URL already contains query parameters, then verify that the term parameter uses an ampersand instead of a second question mark and that existing URLs without parameters still work.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, jquery
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.