MCPcopy Index your code
hub / github.com/plotly/dash / selectionBounds

Function selectionBounds

components/dash-table/src/dash-table/utils/navigation.ts:4–14  ·  view source on GitHub ↗
(selected_cells: ICellCoordinates[])

Source from the content-addressed store, hash-verified

2import {ICellCoordinates} from 'dash-table/components/Table/props';
3
4export function selectionBounds(selected_cells: ICellCoordinates[]) {
5 const selectedRows = R.pluck('row', selected_cells);
6 const selectedCols = R.pluck('column', selected_cells);
7
8 return {
9 minRow: R.reduce<number, number>(R.min, Infinity, selectedRows),
10 minCol: R.reduce<number, number>(R.min, Infinity, selectedCols),
11 maxRow: R.reduce<number, number>(R.max, 0, selectedRows),
12 maxCol: R.reduce<number, number>(R.max, 0, selectedCols)
13 };
14}
15
16export function selectionCycle(
17 nextCell: [number, number],

Callers 2

ControlledTableClass · 0.90
selectionCycleFunction · 0.85

Calls 1

reduceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…