Coder Social home page Coder Social logo

praveenmunagapati / filterbuilder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from akumatus/filterbuilder

0.0 1.0 0.0 1.36 MB

FilterBuilder is an UI component to create queries and filters. Based on vue 2.0.

Home Page: https://akumatus.github.io/FilterBuilder/

Vue 89.55% CSS 10.45%

filterbuilder's Introduction

FilterBuilder

FilterBuilder is an UI component to create queries and filters. Based on vue 2.0 and bootstrap & AdminLTE.css

Use the FilterBuilder to construct queries of arbitrary complexity.

🌰 Here is a DEMO

Page

###Usage Writing HTML like:

<and-or :options="options" :isFirst="isFirst" ref="andOr"></and-or>

Passing Pros like:

{
  options: {
    keys: [{
      name: 'Choose Key',
      id: -99
    },{
      name: 'Crash Number',
      id: 134
    },{
      name: 'Daily Startup',
      id: 256
    }],
    operators: [{
      name: 'Choose Operator',
      id: -99
    },{
      name: 'more',
      id: '>'
    },{
      name: 'equal',
      id: '='
    },{
      name: 'less',
      id: '<'
    }]
  },
  isFirst: true
}

Using queryFormStatus() function to get query result like:

{
    "conditions": "AND",
    "rules": [
        {
            "key": "2",
            "operator": "more",
            "value": "1"
        },
        {
            "key": "2",
            "operator": "equal",
            "value": "3"
        },
        {
            "conditions": "OR",
            "rules": [
                {
                    "key": "1",
                    "operator": "equal",
                    "value": "4"
                },
                {
                    "key": "3",
                    "operator": "equal",
                    "value": "5"
                },
                {
                    "conditions": "AND",
                    "rules": [
                        {
                            "key": "2",
                            "operator": "less",
                            "value": "6"
                        }
                    ]
                }
            ]
        }
    ]
}

Using fillFormStatus() function to fill query into this component.

πŸ’Form validation & other addtional function is still in develop.

filterbuilder's People

Contributors

akumatus avatar tambet avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.