formio.js icon indicating copy to clipboard operation
formio.js copied to clipboard

Select "searchField" option not triggering request

Open coronoz opened this issue 9 years ago • 7 comments

Hi!

The form is rendered, and the select initial options are rendered, but when url data source and searchField are set, no request is triggered when i type in the select seach box. I checked my endpoint in data.url and is returning a valid json, but no new request is triggered after the initial one that populate the select.

Is there an error with my select component config?

I have followed the documentation that is show in https://help.form.io/userguide/form-components/#search-query-name

Here is an example of how i'm loading the form.

$(document).ready(function(){
    var form = new FormioForm(document.getElementById('formio'));
    form.form = {
        components: [
            {
                input: true,
                tableView: true,
                placeholder: "Opción",
                data: {
                    url: "http://page.com/formio/api/options/58"
                },
                dataSrc: "url",
                valueProperty: "value",
                template: "{{ item.text }}",
                type: "select",
                searchField: "query"
            }
        ]
    };
});

coronoz avatar Jun 06 '17 16:06 coronoz

@travist i wonder if this is going to be reviewed and patched in a future release? I think this could be a bug, i have followed the documentation but the setup is not functioning as is required.

coronoz avatar Jun 23 '17 20:06 coronoz

This will be fixed in next release. Coming soon.

travist avatar Sep 26 '17 21:09 travist

Fixed with 2.17.6

travist avatar Sep 26 '17 22:09 travist

Hi guys, how can I remove the search input field inside the select component? Coz in my preference i dont need the search input inside it

juliousglori avatar Sep 07 '18 08:09 juliousglori

Hello @juliousglori you can do it by unselecting the "Enable Static Search" option on the "Data" tab when you are editing the component.

image

image

Aiso786 avatar Sep 07 '18 10:09 Aiso786

hi @Aiso786 thanks for your reply, but currently i didnt see the option Enable Static Search on my formio app: screen shot 2018-09-08 at 11 16 44 am

juliousglori avatar Sep 08 '18 03:09 juliousglori

Enable static search is only available in the 3.x branch of ngFormio. This switches the form builder from the original ng based form builder to the new javascript only form builder. The new form builder is still in beta.

denisekay avatar Sep 10 '18 16:09 denisekay