ember-query-builder

The default blueprint for ember-cli addons.

Usage no npm install needed!

<script type="module">
  import emberQueryBuilder from 'https://cdn.skypack.dev/ember-query-builder';
</script>

README

Ember QueryBuilder

An EmberJS wrapper for jQuery QueryBuilder

Ember Version Build Status npm version Dependency Status

Features

  • Supports all possible options
  • Exposes QueryBuilder instance to allow direct interaction

Installation

ember install ember-query-builder

Helpful Links

  • Changelog

Looking for help?

If it is a bug please open an issue on GitHub.

Usage

Options

The query-builder component accepts all possible jQuery QueryBuilder options.

{{query-builder rules=rules filters=filters plugins=plugins conditions=conditions default_condition='OR'}}

Accessing the QueryBuilder Instance

The query-builder component exposes an onChange action which will pass the current QueryBuilder instance. This action will get called every time the component needs to re-instantiate due to changes in the passed attributes.

{{query-builder filters=filters onChange=(action (mut queryBuilder))}}
if(queryBuilder.validate()) {
  this.set('rules', queryBuilder.getRules());
}

Styling

This addon provides some styling options which can be added to your ember-cli-build file.

Dark Theme

var app = new EmberApp(defaults, {
  'ember-query-builder': {
    darkTheme: true
  }
});

Opt Out

var app = new EmberApp(defaults, {
  'ember-query-builder': {
    includeCss: false
  }
});