Skeudenn / lib/library-selection / toggleSelection
Function: toggleSelection() ​
toggleSelection(
selected,order,id,anchor,shift):Set<string>
Defined in: src/lib/library-selection.ts:15
The selection after a click on the checkbox of the book id. A plain click toggles that book. A Shift-click gives every book of order (the ids as shown) between anchor, the book clicked last, and id the clicked book's new state, the way file managers do; without an anchor still shown, it is a plain click. Returns a new set; selected is left as it is.
Parameters ​
selected ​
ReadonlySet<string>
order ​
readonly string[]
id ​
string
anchor ​
string | null
shift ​
boolean
Returns ​
Set<string>