@@ -2,7 +2,7 @@ import stableSort from '../../../utils/stable-sort'
2
2
import startCase from '../../../utils/startcase'
3
3
import looseEqual from '../../../utils/loose-equal'
4
4
import { arrayIncludes , concat } from '../../../utils/array'
5
- import { isBoolean , isFunction , isNumber , isUndefined , isUndefinedOrNull } from '../../../utils/inspect'
5
+ import { isBoolean , isFunction , isNumber , isUndefined } from '../../../utils/inspect'
6
6
import defaultSortCompare from './default-sort-compare'
7
7
8
8
export default {
@@ -186,30 +186,24 @@ export default {
186
186
this . $off ( 'head-clicked' , this . handleSort )
187
187
}
188
188
} ,
189
- sortBy : {
190
- immediate : true ,
191
- handler ( newVal , oldVal ) {
192
- if ( looseEqual ( newVal , this . localSortBy ) ) {
193
- /* istanbul ignore next */
194
- return
195
- }
196
- // TODO in this PR:
197
- // Update sortInfo object
198
- this . localSortBy = newVal ? concat ( newVal ) : [ ]
189
+ sortBy ( newVal , oldVal ) {
190
+ if ( looseEqual ( newVal , this . localSortBy ) ) {
191
+ /* istanbul ignore next */
192
+ return
199
193
}
194
+ // TODO in this PR:
195
+ // Update sortInfo object
196
+ this . localSortBy = newVal ? concat ( newVal ) : [ ]
200
197
} ,
201
- sortDesc : {
202
- immediate : true ,
203
- handler ( newVal , oldVal ) {
204
- if ( looseEqual ( newVal , this . localSortDesc ) ) {
205
- /* istanbul ignore next */
206
- return
207
- }
208
- // TODO in this PR:
209
- // Update sortInfo object
210
- newVal = isUndefined ( newVal ) ? [ ] : concat ( newVal )
211
- this . localSortDesc = newVal . map ( d => ( isBoolean ( d ) ? d : null ) )
198
+ sortDesc ( newVal , oldVal ) {
199
+ if ( looseEqual ( newVal , this . localSortDesc ) ) {
200
+ /* istanbul ignore next */
201
+ return
212
202
}
203
+ // TODO in this PR:
204
+ // Update sortInfo object
205
+ newVal = isUndefined ( newVal ) ? [ ] : concat ( newVal )
206
+ this . localSortDesc = newVal . map ( d => ( isBoolean ( d ) ? d : null ) )
213
207
} ,
214
208
// Update .sync props
215
209
// TODO in this PR:
0 commit comments