Comments (11)
I can't reproduce
are you using the last upstream ?
what are your filters ?
from jquery-querybuilder.
I added a unit test in #3b0352f493
from jquery-querybuilder.
Same problem here // also impossible to use IN operator with integers ...
from jquery-querybuilder.
Are you willing to give details about your config or not ?
(Jsfiddle)
from jquery-querybuilder.
This one shows how IN operator doesn't quote every item separately as mentionned above by giessebi:
http://jsfiddle.net/graphitekom/vqjmpyLx/
This one shows how IN operator doesn't allow a list of integers :
http://jsfiddle.net/graphitekom/ap9gxo4L/
from jquery-querybuilder.
this is not an intended usage,
the IN operator is actually only for multiple select and checkbox (and plugins like Selectize)
you can use a simple text input with IN operator if you provide the valueParser
callback to transform your string in an array
from jquery-querybuilder.
I prefer to stick to this highly customizable way, rather than impose comma as separator (or even add a parameter for that)
from jquery-querybuilder.
Hi,
actually last release fixed it for me: it correctly separates arguments, with quoted strings and unquoted integers. So as far as I'm concerned I'll close the issue.
Thank you.
from jquery-querybuilder.
I have the following Selectize and it doesn't quote string the individual values. Do I needed a custom valueGetter to get values like IN('1415','1516')
id: 'fayr',
label: 'FAYR',
type: 'string',
plugin: 'selectize',
plugin_config: {
valueField: 'value',
labelField: 'name',
searchField: 'name',
options: [],
create: false,
maxItems: 3,
plugins: ['remove_button'],
load: function (query, callback) {
if (!query.length) return callback();
$.ajax({
url: '/api/ASC_SearchQuery',
type: 'GET',
dataType: 'json',
error: function () {
callback();
},
success: function (res) {
callback(res);
}
});
}
},
valueSetter: function (rule, value) {
console.log(rule);
rule.$el.find('.rule-value-container input')[0].selectize.setValue(value);
}
from jquery-querybuilder.
yes you need to customize the valueSetter, and also the valueParser
from jquery-querybuilder.
Version 2.4.0 added value_separator
option.
$('#builder').queryBuilder({
filters: [
{
id: 'name',
type: 'string',
value_separator: ','
}
]
});
from jquery-querybuilder.
Related Issues (20)
- query-builder.js:460 Uncaught TypeError: e.extendext is not a function
- Does this component support configuration table association queries?
- Invert plugin and custom operators (`operatorOpposites ` and `conditionOpposites` update defaults) HOT 1
- Default rules not being selected with bt-selectpicker enabled HOT 1
- TypeError: Cannot read properties of undefined (reading 'id') HOT 1
- Minified styles missing in version 2.7.0 HOT 1
- filterSelect wrong cssClass
- Dir structure for custom plugin
- Custom Plugin
- Clone/Duplicate A Group
- add_rule button icon not showing in query-builder.standalone.js HOT 1
- Use momentjs strict mode
- Build instructions needed HOT 2
- Modify filters depending on group level HOT 2
- Move Flags.css into Repo HOT 1
- Bootstrap 5 Documentation HOT 7
- Using nb_inputs: 2 with select inputs HOT 1
- Does QueryBuilder Support Regex?
- nb_inputs with select and input fields combined
- How to change the input type of the filter control HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-querybuilder.