jQuery-QueryBuilder icon indicating copy to clipboard operation
jQuery-QueryBuilder copied to clipboard

Limiting number of rules

Open nikataus opened this issue 9 years ago • 11 comments

Hi,

I found a topic regarding this but wanted to check to see there is any configuration we can use to limit the number of Rules and Groups added. Thanks!

nikataus avatar Jun 07 '16 20:06 nikataus

Which topic ?

mistic100 avatar Jun 08 '16 16:06 mistic100

Thanks for your reply. Here is what I found related to my question: https://github.com/mistic100/jQuery-QueryBuilder/issues/181

Is there any configuration or I need to go through events and change buttons class...?

nikataus avatar Jun 08 '16 17:06 nikataus

It's not configurable. Might think about it.

mistic100 avatar Jun 08 '16 17:06 mistic100

I think it's a good idea. Also it might be configurable for all rules or number of rules per group. When the total limit is reached may be all add rule buttons become disabled, but also some logic should be applied to add groups buttons ... I'm also thinking that there should be some notification to the user that max rules limit is reached so it could be also that buttons are still enabled but when clicked error/message notification let the user know about the limit... Just some thoughts..

nikataus avatar Jun 08 '16 17:06 nikataus

Proposal

Global parameters :

  • max_groups
  • max_rules
  • max_depth (current allow_groups)
  • max_rules_per_group

Group flags when using setRules (will not override global config) :

  • max_rules
  • max_groups
  • max_depth

mistic100 avatar Jun 08 '16 18:06 mistic100

Sounds good! When can we expect to have this new feature?

Thanks.

nikataus avatar Jun 09 '16 18:06 nikataus

I can't tell, sorry

mistic100 avatar Jun 09 '16 18:06 mistic100

I understand, I appreciate your quick response!

Nick.

nikataus avatar Jun 09 '16 18:06 nikataus

👍 max_depth and max_rules_per_group would meet my needs. The other settings seem reasonable and comprehensive.

murrant avatar Jun 28 '16 03:06 murrant

+1 for this feature

fsmeier avatar Aug 08 '16 09:08 fsmeier

This would be a great feature, +1. The proposal sounds great!

Matthewsre avatar Aug 03 '17 02:08 Matthewsre