mistic100 / jQuery-QueryBuilder

jQuery plugin offering an interface to create complex queries
https://querybuilder.js.org
MIT License
1.68k stars 552 forks source link

selectpicker plugin with remote data fill #895

Closed mustafaerdogmus closed 4 years ago

mustafaerdogmus commented 4 years ago

`Issues guidelines

I am using selectpicker from QueryBuilder plugins. I want to populate this selectpicker plugin with remote data. I could not find an example.

            {
                id: 'ID',
                field: 'ID',
                label: 'Birim',
                type: 'integer',
                input: 'select',
                plugin: 'selectpicker',
                multiple: true,
                plugin_config: {
                    iconBase: 'fa',
                    tickIcon: 'fa-check',
                    includeSelectAllOption: true,
                    selectAllNumber: false,
                    numberDisplayed: 2,
                    //tr
                    selectAllText: 'Tümünü Seç',
                    deselectAllText: 'Tüm Seçimi Kaldır',
                    itemsSelectedText: 'Adet Birim  Seçildi',
                    nonSelectedText: "Lütfen Birim Seçiniz",
                    actionsBox: true,
                    liveSearch: true,
                    width: 'auto',
                    selectedTextFormat: 'count',
                    liveSearchStyle: 'contains',
                    multiple: 'multiple',

            },
                values: {
                '':'',  // for select2 palceholder
                1: 'Books',
                2: 'Movies',
                3: 'Music',
                4: 'Tools',
                5: 'Goodies',
                6: 'Clothes'
            },
            operators: ['equal', 'not_equal', 'in', 'not_in', 'is_null', 'is_not_null']
        }`

how do I populate this plugin with remote data

mistic100 commented 4 years ago

this is not possible, consider using another plugin like "selectize" which has it's own datasource and does not rely on the DOM content.