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

Function ifRowIndex

components/dash-table/src/dash-table/conditional/index.ts:94–108  ·  view source on GitHub ↗
(
    condition: IIndexedRowElement | undefined,
    rowIndex: number
)

Source from the content-addressed store, hash-verified

92}
93
94export function ifRowIndex(
95 condition: IIndexedRowElement | undefined,
96 rowIndex: number
97) {
98 if (!condition || condition.row_index === undefined) {
99 return true;
100 }
101
102 const rowCondition = condition.row_index;
103 return typeof rowCondition === 'string'
104 ? rowIndex % 2 === (rowCondition === 'odd' ? 1 : 0)
105 : Array.isArray(rowCondition)
106 ? R.includes(rowIndex, rowCondition)
107 : rowIndex === rowCondition;
108}
109
110export function ifHeaderIndex(
111 condition: IIndexedHeaderElement | undefined,

Callers 2

convertElementFunction · 0.90
getSelectedTooltipFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…