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

Add rule only inside group

Open rafaello9 opened this issue 5 years ago • 1 comments

Hello. I set the parameter allow_groups: 1, that is, I need only first level groups. Now I have a little problem. I need to make sure that when you click on the "Add Rule" button, a new rule is added only to the end of your group. Now a new rule is added after the entire list, where groups and rules are mixed. here is a picture Also, it is necessary that the new group is always added to the end of the general list. How can i do this? Thank!

rafaello9 avatar Jun 19 '19 03:06 rafaello9

This is not possible out of the box, you will need to listen to events "afterAddGroup" and "afterAddRule" and modify the model.

The source of the sortable plugin is a good start to understand his to manipulate the model.

Sent from MailDroid

-----Original Message----- From: rafaello9 [email protected] To: mistic100/jQuery-QueryBuilder [email protected] Cc: Subscribed [email protected] Sent: mer., 19 juin 2019 5:27 Subject: [mistic100/jQuery-QueryBuilder] Add rule only inside group (#798)

Hello. I set the parameter allow_groups: 1, that is, I need only first level groups. Now I have a little problem. I need to make sure that when you click on the "Add Rule" button, a new rule is added only to the end of your group. Now a new rule is added after the entire list, where groups and rules are mixed. here is a picture Also, it is necessary that the new group is always added to the end of the general list. How can i do this? Thank!

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/mistic100/jQuery-QueryBuilder/issues/798

mistic100 avatar Jun 19 '19 05:06 mistic100