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

Uncaught TypeError: Cannot read property 'toLowerCase' of undefined Selectize #911

Closed aliraza93 closed 3 years ago

aliraza93 commented 3 years ago

Greetings

 filters: [
     /*
                    * Selectize
                    */
                    {
                        id: 'state',
                        label: 'State',
                        icon: 'glyphicon glyphicon-globe',
                        type: 'string',
                        input: 'select',
                        multiple: false,
                        plugin: 'selectize',
                        values: ['Value 1', 'Value 2', 'Value 3', 'Value 4'],
                        plugin_config: {
                        valueField: 'id',
                        labelField: 'name',
                        searchField: 'name',
                        sortField: 'name',
                        options: [
                            { id: "AL", name: "Alabama" },
                            { id: "AK", name: "Alaska" },
                            { id: "AZ", name: "Arizona" },
                            { id: "AR", name: "Arkansas" },
                            { id: "CA", name: "California" },
                            { id: "CO", name: "Colorado" },
                            { id: "CT", name: "Connecticut" },
                            { id: "DE", name: "Delaware" },
                            { id: "DC", name: "District of Columbia" },
                            { id: "FL", name: "Florida" },
                            { id: "GA", name: "Georgia" },
                            { id: "HI", name: "Hawaii" },
                            { id: "ID", name: "Idaho" }
                        ]
                        },
                        valueSetter: function(rule, value) {
                            rule.$el.target.find('.rule-value-container select')[0].selectize.setValue(value);
                        }
                    },
]

Capture

Thank you

mistic100 commented 3 years ago

You will have to debug by yourself (not using "min" files). I cannot tell why you get this error in another plugin.