Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

259
Vistas
Querybuilder.js - How can I limit the conditions to have "AND" in the root, and "OR" in the subgroups?

I am used to working in C#, and just got handed this project with querybuilder. I have been searching for hours and can't seem to figure out how to achieve this.

What I want is for the root condition to be "AND" - which is default.

But since it is default - when I click "Add group" and then "Add rule" in that group, the "And"-condition is selected by default. But I want the "or" to be selected between rules in all groups.

I added a photo which you can reach with below link.

Does anyone have an idea? It would be highly appreciated.

Limit conditions in querybuilder subgroups

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Ok, I would then do something like this with jQuery:

$('#btn-add-rule').on('click', function() {
    $("#btn-parameter-or").trigger("click");
});

It can be a bit rough if the buttons don't have unique ids or classes, then you have to select by nth-child() selector

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda