Hi.
I am using SelectionCommandHandler
.
In case of option multi: false
, it work correctly.
But, in case of option multi: true
, it dose not work correctly. The argument to SelectionCommandHandler.execute()
is always an array of length 1, even if there are multiple items in SelectionService.selection
.
SelectionCommandHandler.getSelection()
is implemented as follows:
protected getSelection(...args: any[]): S | S[] | undefined {
const givenSelection = args.length && this.toSelection(args[0]);
if (givenSelection) {
return this.isMulti() ? [givenSelection] : givenSelection;
}
const globalSelection = this.getSingleSelection(this.selectionService.selection);
if (this.isMulti()) {
return this.getMultiSelection(globalSelection);
}
return this.getSingleSelection(globalSelection);
}
Isn’t Line 6: const globalSelection = this.getSingleSelection(this.selectionService.selection)
a mistake and correct implementation is const globalSelection = this.selectionService.selection
?