Skip to content

Commit 8f6c020

Browse files
authored
Update mixin-sorting.js
1 parent 1374e4c commit 8f6c020

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ export default {
203203
updateLocalSortInfo(sortBy, sortDesc) {
204204
if (this.isSortable) {
205205
// Updates localSortInfo array with the given values
206-
const sortByArr = concat(sortBy).filter(s => !isUndefinedOrNull(s))
206+
let sortByArr = concat(sortBy).filter(s => !isUndefinedOrNull(s))
207+
sortByArr = this.sortMulti ? sortByArr : sortByArr[0] || []
207208
const sortDescArr = concat(sortDesc)
208209
const computedFieldsObj = this.computedFieldsObj
209210
this.localSortInfo = sortByArr.map((key, idx) => {

0 commit comments

Comments
 (0)