Skip to content

Commit

Permalink
fix(VDataTable): no multiple select if last entry not selected (#13686)
Browse files Browse the repository at this point in the history
fixes #13684
  • Loading branch information
florealcab committed Jul 19, 2021
1 parent 7fac117 commit 9fd2afa
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,11 @@ export default mixins(

const index = this.selectableItems.findIndex(x => getObjectValueByPath(x, this.itemKey) === key)
if (this.lastEntry === -1) this.lastEntry = index
else if (this.shiftKeyDown && !this.singleSelect && emit) this.multipleSelect(value, emit, selection, index)
else {
const lastEntryKey = getObjectValueByPath(this.selectableItems[this.lastEntry], this.itemKey)
const lastEntryKeySelected = Object.keys(this.selection).includes(lastEntryKey.toString())
if (this.shiftKeyDown && !this.singleSelect && emit) this.multipleSelect(lastEntryKeySelected, emit, selection, index)
}
this.lastEntry = index

if (this.singleSelect && emit) {
Expand Down

0 comments on commit 9fd2afa

Please sign in to comment.