question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disable add group to sub group not working

See original GitHub issue

In my index.coffee

$('#builder').on 'click', '.btn-custom-group', (e) ->
      builder     = $('#builder')
      root        = builder.queryBuilder 'getModel'
      group       = builder.queryBuilder('addGroup', root, false)
      group.flags.no_add_group = true
      group.flags.no_add_rule = true

console group.flags i got this:

{condition_readonly: false, no_add_rule: true, no_add_group: true, no_delete: false, no_sortable: false, …}
condition_readonly: false
no_add_group: true
no_add_rule: true
no_delete: false
no_drop: false
no_sortable: false
__proto__: Object

but my sub group add group button still not disabled, any idea?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mistic100commented, Dec 14, 2018

Your call to addGroup is wrong, you put “root” before the method name.

And please help yourself by not using the minimised file while developing.

Sent from MailDroid

-----Original Message----- From: Kiry Meas notifications@github.com To: mistic100/jQuery-QueryBuilder jQuery-QueryBuilder@noreply.github.com Cc: Damien Sorel contact@git.strangeplanet.fr, Mention mention@noreply.github.com Sent: ven., 14 déc. 2018 8:21 Subject: Re: [mistic100/jQuery-QueryBuilder] Disable add group to sub group not working (#752)

@mistic100, thank you for obvious instruction, but when I passed direct flags object options, another error occurred.

$('#builder').on 'click', '.btn-custom-group', (e) ->
      builder    = $('#builder')
      root         = builder.queryBuilder 'getModel'
      group      = builder.queryBuilder root, 'addGroup', false, false,
                           no_add_group: true
                           no_add_rule: false

      rule      = builder.queryBuilder('addRule', group)
      rule1     = builder.queryBuilder('addRule', group)
      rule2     = builder.queryBuilder('addRule', group)

Error Msg:

Uncaught TypeError: e.addRule is not a function
    at c.addRule (query-builder.standalone.min.self-87d960f6b3d13b0e3fb4b374d9c1996b9dc0456c0155ece5a8ad909b8450b550.js?body=1:8)
    at jQuery.fn.init.$.fn.queryBuilder (query-builder.standalone.min.self-87d960f6b3d13b0e3fb4b374d9c1996b9dc0456c0155ece5a8ad909b8450b550.js?body=1:8)
    at HTMLButtonElement.<anonymous> (client_advance_search.self-05b8869ebb0972606f4536f92c4d0b61713c4ada6c15ec7eb04a93e2888d4566.js?body=1:358)
    at HTMLDivElement.dispatch (jquery.self-c64a74367bda6ef8b860f19e74df08927ca99d2be2ac934e9e92d5fd361e0da4.js?body=1:5228)
    at HTMLDivElement.elemData.handle (jquery.self-c64a74367bda6ef8b860f19e74df08927ca99d2be2ac934e9e92d5fd361e0da4.js?body=1:4880)

– You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/mistic100/jQuery-QueryBuilder/issues/752#issuecomment-447238105

0reactions
kirykrcommented, Dec 14, 2018

@mistic100 Thanks a lot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add a group to another group - Google Workspace Admin Help
Groups. On the Groups list, point to the group that will become the parent group. In the parent group row, click Add members....
Read more >
Optionally disable group membership inheritance: MVC - GitLab
Current solution for this problem: When adding users via SAML at parent level group (namespace), users inherent down to subgroups and projects.
Read more >
Group or ungroup messages in your Inbox - Microsoft Support
Disable the Grouping feature​​ On the View menu, point to Arrange By, and then click Show in Groups. If Show in Groups is...
Read more >
Create and manage groups of contacts on iCloud.com
Click the contact, then press the Delete key. Delete a group. When you delete a group, the contacts it contains remain in the...
Read more >
Managing nested groups | Administering Jira applications ...
If you add a user to a group, the user is added to the named group and not to any other groups. If...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found