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

Function ifHeaderIndex

components/dash-table/src/dash-table/conditional/index.ts:110–124  ·  view source on GitHub ↗
(
    condition: IIndexedHeaderElement | undefined,
    headerIndex: number
)

Source from the content-addressed store, hash-verified

108}
109
110export function ifHeaderIndex(
111 condition: IIndexedHeaderElement | undefined,
112 headerIndex: number
113) {
114 if (!condition || condition.header_index === undefined) {
115 return true;
116 }
117
118 const headerCondition = condition.header_index;
119 return typeof headerCondition === 'string'
120 ? headerIndex % 2 === (headerCondition === 'odd' ? 1 : 0)
121 : Array.isArray(headerCondition)
122 ? R.includes(headerIndex, headerCondition)
123 : headerIndex === headerCondition;
124}
125
126export function ifFilter(
127 condition: IConditionalElement | undefined,

Callers 1

convertElementFunction · 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…