File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -210,18 +210,19 @@ export default {
210
210
const multiselectKeys = Array . isArray ( this . multiselectKey ) ? this . multiselectKey : [ this . multiselectKey ]
211
211
const multiselectKeyIsPressed = event && ! ! multiselectKeys . find ( key => event [ key ] )
212
212
// const shiftKeyIsPressed = event && event.shiftKey && this.allowMultiselect
213
+ const shiftKeyIsPressed = event && event . shiftKey && this . allowMultiselect
214
+ const enableShiftSelection = shiftKeyIsPressed && this . lastSelectedNode
213
215
214
216
addToSelection = ( multiselectKeyIsPressed || addToSelection ) && this . allowMultiselect
215
217
216
218
const newNodes = this . copy ( this . currentValue )
217
219
// const newSelectedNodes = this.getSelected(newNodes)
218
220
219
- const shiftSelectionMode = this . allowMultiselect && event && event . shiftKey && this . lastSelectedNode
220
221
const selectedNodes = [ ]
221
222
let shiftSelectionStarted = false
222
223
223
224
this . traverse ( ( node , nodeModel ) => {
224
- if ( shiftSelectionMode ) {
225
+ if ( enableShiftSelection ) {
225
226
if ( node . pathStr === clickedNode . pathStr || node . pathStr === this . lastSelectedNode . pathStr ) {
226
227
nodeModel . isSelected = node . isSelectable
227
228
shiftSelectionStarted = ! shiftSelectionStarted
You can’t perform that action at this time.
0 commit comments