-
Notifications
You must be signed in to change notification settings - Fork 554
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
Operator selector rendering issue when there is only one operator #948
Comments
This is not an issue. The select element has a code Add the following CSS as mentioned in the 'No Bootstrap' page to get it working:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When a rule has just one operator, both a label and a select is rendered as operator selectors.
This is due to the template:
QueryBuilder.templates.operatorSelect = '
{{? it.operators.length === 1 }}
{{= it.translate("operators", it.operators[0].type) }}
{{?}}
<------- having "else" here would fix the problem
{{ var optgroup = null; }}
{{~ it.operators: operator }} {{? optgroup !== operator.optgroup }} {{? optgroup !== null }}{{?}} {{? (optgroup = operator.optgroup) !== null }} {{?}} {{?}} <option value="{{= operator.type }}" {{? operator.icon}}data-icon="{{= operator.icon}}"{{?}}>{{= it.translate("operators", operator.type) }} {{~}} {{? optgroup !== null }}{{?}} ';
The text was updated successfully, but these errors were encountered: