Coder Social home page Coder Social logo

Comments (11)

mistic100 avatar mistic100 commented on August 23, 2024

I can't reproduce

are you using the last upstream ?

what are your filters ?

from jquery-querybuilder.

mistic100 avatar mistic100 commented on August 23, 2024

I added a unit test in #3b0352f493

from jquery-querybuilder.

graphite-kom avatar graphite-kom commented on August 23, 2024

Same problem here // also impossible to use IN operator with integers ...

from jquery-querybuilder.

mistic100 avatar mistic100 commented on August 23, 2024

Are you willing to give details about your config or not ?
(Jsfiddle)

from jquery-querybuilder.

graphite-kom avatar graphite-kom commented on August 23, 2024

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.

mistic100 avatar mistic100 commented on August 23, 2024

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.

mistic100 avatar mistic100 commented on August 23, 2024

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.

giessebi avatar giessebi commented on August 23, 2024

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.

heffer86 avatar heffer86 commented on August 23, 2024

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.

mistic100 avatar mistic100 commented on August 23, 2024

yes you need to customize the valueSetter, and also the valueParser

from jquery-querybuilder.

mistic100 avatar mistic100 commented on August 23, 2024

Version 2.4.0 added value_separator option.

$('#builder').queryBuilder({
  filters: [
    {
      id: 'name',
      type: 'string',
      value_separator: ','
    }
  ]
});

from jquery-querybuilder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.