🌐 AI搜索 & 代理 主页
Skip to content

Commit 4d83aa1

Browse files
committed
Update mixin-filtering.js
1 parent bf0ca7c commit 4d83aa1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/components/table/helpers/mixin-filtering.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default {
3232
return {
3333
// Flag for displaying which empty slot to show and some event triggering
3434
isFiltered: false,
35-
// Where we store the copy of the filter citeria after debouncing
35+
// Where we store the copy of the filter criteria after debouncing
3636
localFilter: ''
3737
}
3838
},
@@ -109,19 +109,19 @@ export default {
109109
this.$_filterTimer = null
110110
}
111111
if (timeout) {
112-
// If we have a debounce time, delay the update of this.localFilter
112+
// If we have a debounce time, delay the update of `localFilter`
113113
this.$_filterTimer = setTimeout(() => {
114114
this.$_filterTimer = null
115115
this.localFilter = this.filterSanitize(this.filter)
116116
}, timeout)
117117
} else {
118-
// Otherwise, immediately update this.localFilter
118+
// Otherwise, immediately update `localFilter`
119119
this.localFilter = this.filterSanitize(this.filter)
120120
}
121121
}
122122
},
123-
// Watch for changes to the filter criteria and filtered items vs localItems).
124-
// And set visual state and emit events as required
123+
// Watch for changes to the filter criteria and filtered items vs `localItems`
124+
// Set visual state and emit events as required
125125
filteredCheck({ filteredItems, localItems, localFilter }) {
126126
// Determine if the dataset is filtered or not
127127
let isFiltered = false
@@ -152,10 +152,10 @@ export default {
152152
// Create non-reactive prop where we store the debounce timer id
153153
this.$_filterTimer = null
154154
// If filter is "pre-set", set the criteria
155-
// This will trigger any watchers/dependants
155+
// This will trigger any watchers/dependents
156156
this.localFilter = this.filterSanitize(this.filter)
157-
// Set the initial filtered state.
158-
// In a nextTick so that we trigger a filtered event if needed
157+
// Set the initial filtered state
158+
// In a `$nextTick()` so that we trigger a filtered event if needed
159159
this.$nextTick(() => {
160160
this.isFiltered = Boolean(this.localFilter)
161161
})
@@ -175,7 +175,7 @@ export default {
175175
!this.localFilterFn &&
176176
!(isString(criteria) || isRegExp(criteria))
177177
) {
178-
// If using internal filter function, which only accepts string or RegExp
178+
// If using internal filter function, which only accepts string or RegExp,
179179
// return '' to signify no filter
180180
return ''
181181
}

0 commit comments

Comments
 (0)