Skip to content

can't remove operators #12

@Kallin

Description

@Kallin

I tried to reduce operators by passing option on querybuilder creation, but it looks like due to deep jquery merge on passed in options and default options we can only add operators, not remove, https://github.com/mistic100/jQuery-QueryBuilder/blob/master/src/query-builder.js#L37 .

try passing something simple like:

operators : [
{type: 'equal', accept_values: true, apply_to: ['string', 'number', 'datetime']},
{type: 'not_equal', accept_values: true, apply_to: ['string', 'number', 'datetime']},
{type: 'in', accept_values: true, apply_to: []},
{type: 'not_in', accept_values: true, apply_to: []},
]

and notice it will not remove the existing options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIdentified bug which needs a fix

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions