Skip to content

Instantly share code, notes, and snippets.

@mtermoul

mtermoul/filterDefs.js Secret

Created Apr 3, 2019
Embed
What would you like to do?
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
You can’t perform that action at this time.