Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default operator #579

Closed
jftsaraiva opened this issue Oct 12, 2017 · 1 comment
Closed

Default operator #579

jftsaraiva opened this issue Oct 12, 2017 · 1 comment
Labels
feature New feature
Milestone

Comments

@jftsaraiva
Copy link

jftsaraiva commented Oct 12, 2017

How can we define an default operator?

By example, with the following filter:

{
    id: 'category',
    label: 'Category',
    type: 'integer',
    input: 'select',
    values: {
      1: 'Books',
      2: 'Movies',
      3: 'Music',
      4: 'Tools',
      5: 'Goodies',
      6: 'Clothes'
    },
    operators: ['equal', 'not_equal', 'in', 'not_in', 'is_null', 'is_not_null']
  }

I would like to keep the order: 'equal', 'not_equal', 'in', 'not_in', 'is_null', 'is_not_null' and by default I wanna select in operator, but is select the first operator - in this example: equal.

I can find default_condition, default_filter, default_value, ... but I can't find default_operator or similar. I'm missing something?

@mistic100
Copy link
Owner

I'll add it.

In the meantime you can use "afterCreateRuleOperatorSelect.queryBuilder" event and change the rule operator (I am not sure about the event name, check the doc)

@mistic100 mistic100 added the feature New feature label Oct 17, 2017
@mistic100 mistic100 added this to the 2.4.5 milestone Oct 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

2 participants