|
@@ -1369,7 +1369,7 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
initSearch () {
|
|
initSearch () {
|
|
|
- this.filterOptions = this.options.filterOptions || this.options.filterOptions
|
|
|
|
|
|
|
+ this.filterOptions = this.filterOptions || this.options.filterOptions
|
|
|
if (this.options.sidePagination !== 'server') {
|
|
if (this.options.sidePagination !== 'server') {
|
|
|
if (this.options.customSearch) {
|
|
if (this.options.customSearch) {
|
|
|
this.data = Utils.calculateObjectValue(this.options, this.options.customSearch,
|
|
this.data = Utils.calculateObjectValue(this.options, this.options.customSearch,
|
|
@@ -1382,13 +1382,13 @@
|
|
|
const f = Utils.isEmptyObject(this.filterColumns) ? null : this.filterColumns
|
|
const f = Utils.isEmptyObject(this.filterColumns) ? null : this.filterColumns
|
|
|
|
|
|
|
|
// Check filter
|
|
// Check filter
|
|
|
- if (typeof this.options.filterOptions.filterAlgorithm === 'function') {
|
|
|
|
|
|
|
+ if (typeof this.filterOptions.filterAlgorithm === 'function') {
|
|
|
this.data = this.options.data.filter((item, i) => {
|
|
this.data = this.options.data.filter((item, i) => {
|
|
|
- return this.options.filterOptions.filterAlgorithm.apply(null, [item, f])
|
|
|
|
|
|
|
+ return this.filterOptions.filterAlgorithm.apply(null, [item, f])
|
|
|
})
|
|
})
|
|
|
- } else if (typeof this.options.filterOptions.filterAlgorithm === 'string') {
|
|
|
|
|
|
|
+ } else if (typeof this.filterOptions.filterAlgorithm === 'string') {
|
|
|
this.data = f ? this.options.data.filter((item, i) => {
|
|
this.data = f ? this.options.data.filter((item, i) => {
|
|
|
- const filterAlgorithm = this.options.filterOptions.filterAlgorithm
|
|
|
|
|
|
|
+ const filterAlgorithm = this.filterOptions.filterAlgorithm
|
|
|
if (filterAlgorithm === 'and') {
|
|
if (filterAlgorithm === 'and') {
|
|
|
for (const key in f) {
|
|
for (const key in f) {
|
|
|
if (
|
|
if (
|