Skip to content

Instantly share code, notes, and snippets.

@mtermoul
Created April 3, 2019 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mtermoul/486d38387011c40f345a06c1e1262333 to your computer and use it in GitHub Desktop.
Save mtermoul/486d38387011c40f345a06c1e1262333 to your computer and use it in GitHub Desktop.
src/views/Home.vue
filterDefs: {
text: {contains: {display: 'Contains', function: this.filterByTextContains},
startsWith: {display: 'Starts with', function: this.filterByTextStartsWith}},
number: {equal: {display: 'Equal', function: this.filterByNumberEqual, decimalPoint: 1},
greater: {display: 'Greater than', function: this.filterByNumberGreater, decimalPoint: 1},
less: {display: 'Less than', function: this.filterByNumberLess, decimalPoint: 1},
between: {display: 'Between', function: this.filterByNumberBetween, decimalPoint: 1}},
date: {equal: {display: 'Equal', function: this.filterByDateEqual, format: 'MM/DD/YYYY'},
greater: {display: 'Greater than', function: this.filterByDateGreater, format: 'MM/DD/YYYY'},
less: {display: 'Less than', function: this.filterByDateLess, format: 'MM/DD/YYYY'},
between: {display: 'Between', function: this.filterByDateBetween, format: 'MM/DD/YYYY'}},
lookup: {is: {display: 'Is', function: this.filterByLookupIs},
isNot: {display: 'Is not', function: this.filterByLookupIsNot}}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment