I am using the Jquery query builder where I am also using the select2 plugin.
The question is when I need to set the values the select2 is not rendering the options, instead is empty even the value is there.
here is the example:
$('#builder-widgets').queryBuilder({
// plugins: ['bt-tooltip-errors'],
filters: [
{
id: 'manufacturers',
label: 'Brands',
operators: ['in', 'not_in'],
type: 'string',
multiple: 'multiple',
plugin: 'select2',
plugin_config: {
data: [
{
id: 1,
text: 'xyz'
},
{
id: 2,
text: 'abc'
}
],
width: '500px',
tags: true,
multiple: true
},
valueSetter: function (rule, value) {
console.log(value)
}
},