So I've added in the AUI Single Select in my JIRA plugin, and when I hit enter after making my selection, the URL changes and gains a parameter with a key that is the name of the Selector and value which was the value in the selector. However, the issue is it doesn't append, but overwrite all other parameters.
Is there a way to change whatever Javascript function is built into the element so that it will append the parameter to the existing list instead of overwriting them all?
EX:
(Desired)
https://myInstance.com/plugin/servlet/Page?q=10
->
https://myInstance.com/plugin/servlet/Page?q=10&name=value
instead of
(What currently happens)
https://myInstance.com/plugin/servlet/Page?q=10
->
https://myInstance.com/plugin/servlet/Page?name=value
AUI Element Documentation:
https://docs.atlassian.com/aui/6.0.9/docs/single-select.html
Going by your description, I will guess that you are adding the AUI Single Select in to its own `<form>` element and then submitting that `<form>`?
This is standard HTML form behaviour -- pressing "enter" inside a form field with a single input element will submit that form. (See the spec and this example).
If you want the value of "q" to be submitted along with the value of your single-select field, you'll need to do one of two things:
* Add the value of "q" as a hidden input field inside your single-select form, or
* Capture the "submit" event of the form with the single select field in it with JavaScript, add the value of "q" to the data, and submit the request manually.
Hope that helps!
- Daz
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.