MDK Logo
ReferenceUI KitReactHooks

useExplorerSelection

Bridges the Explorer table selection into the shared `devicesStore` that the write-control cards read. Given the active tab and the table's row-selection, it…

Bridges the Explorer table selection into the shared `devicesStore` that the write-control cards read. Given the active tab and the table's row-selection, it dispatches the matching setters — containers → `selectMultipleContainers`, miners → `setSelectDevice` + `selectDeviceTag`, cabinets → `selectLVCabinet` — and, for containers/miners, fetches the richer detail snapshots ({@link useContainerSnapshots}) so the controls see the full `last.snap` config (tank / cooling / power-mode) the lean list projection omits, then derives the per-socket selection into the store. Selections are reset whenever the selection or tab changes and on unmount, so a stale selection can never drive the panel.

import { useExplorerSelection } from "@tetherto/mdk-react-devkit";

Signature

({ deviceType, rows, selected, }: UseExplorerSelectionParams) => UseExplorerSelectionResult
Package@tetherto/mdk-react-devkit