Skip to content

Tankōbon / hooks/use-library-selection / LibrarySelection

Interface: LibrarySelection ​

Defined in: hooks/use-library-selection.ts:11

What useLibrarySelection returns.

Properties ​

clear ​

clear: () => void

Defined in: hooks/use-library-selection.ts:25

Unticks everything.

Returns ​

void


selected ​

selected: ReadonlySet<string>

Defined in: hooks/use-library-selection.ts:13

Ids of the ticked books, kept across filter changes.


selection ​

selection: LibraryEntry[]

Defined in: hooks/use-library-selection.ts:15

The ticked books, the ones shown first (in screen order) then the hidden ones (library order).


shownSelected ​

shownSelected: number

Defined in: hooks/use-library-selection.ts:17

How many of the shown books are ticked.


tick ​

tick: (id, shift) => void

Defined in: hooks/use-library-selection.ts:19

Ticks or unticks a book; with shift, the whole range from the book ticked last.

Parameters ​

id ​

string

shift ​

boolean

Returns ​

void


tickAllShown ​

tickAllShown: () => void

Defined in: hooks/use-library-selection.ts:23

Ticks every shown book, or unticks them all when they already are.

Returns ​

void


tickGroup ​

tickGroup: (ids) => void

Defined in: hooks/use-library-selection.ts:21

Ticks every book of a group, or unticks them all when they already are.

Parameters ​

ids ​

readonly string[]

Returns ​

void