Skip to content

Autocomplete should allow for the source to already have parameters #2321

@grahamegrieve

Description

@grahamegrieve

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=https%3A%2F%2Fsiteproxy.ruqli.workers.dev%3A443%2Fhttp%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

Activity

mgol

mgol commented on Jan 10, 2025

@mgol
Member

Thanks for the report. Does the issue you describe exist when jQuery UI 1.12.1 is used or only with jQuery UI 1.13.0 or newer?

mgol

mgol commented on Jan 10, 2025

@mgol
Member

Also, please provide a runnable test case on a platform like JS Bin.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @mgol@grahamegrieve

        Issue actions

          Autocomplete should allow for the source to already have parameters · Issue #2321 · jquery/jquery-ui