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

Class HeaderFactory

components/dash-table/src/dash-table/components/HeaderFactory.tsx:20–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18import {HeaderFactoryProps} from './Table/props';
19
20export default class HeaderFactory {
21 private readonly headerContent = derivedHeaderContent();
22 private readonly headerOperations = derivedHeaderOperations();
23 private readonly headerStyles = derivedHeaderStyles();
24 private readonly headerOpStyles = derivedHeaderOpStyles();
25 private readonly headerWrappers = derivedHeaderWrappers(() => this.props);
26 private readonly relevantStyles = derivedRelevantHeaderStyles();
27 private readonly labelsAndIndices = derivedLabelsAndIndices();
28
29 private get props() {
30 return this.propsFn();
31 }
32
33 constructor(private readonly propsFn: () => HeaderFactoryProps) {}
34
35 public createHeaders(
36 headerEdges: IEdgesMatrices | undefined,
37 headerOpEdges: IEdgesMatrices | undefined
38 ) {
39 const props = this.props;
40
41 const {
42 column_selectable,
43 columns,
44 data,
45 filter_action,
46 hidden_columns,
47 id,
48 map,
49 merge_duplicate_headers,
50 page_action,
51 row_deletable,
52 row_selectable,
53 selected_columns,
54 setFilter,
55 setProps,
56 sort_action,
57 sort_by,
58 sort_mode,
59 style_cell,
60 style_cell_conditional,
61 style_header,
62 style_header_conditional,
63 visibleColumns
64 } = props;
65
66 const labelsAndIndices = this.labelsAndIndices(
67 columns,
68 visibleColumns,
69 merge_duplicate_headers
70 );
71 const headerRows = labelsAndIndices.length;
72
73 const relevantStyles = this.relevantStyles(
74 style_cell,
75 style_header,
76 style_cell_conditional,
77 style_header_conditional

Callers

nothing calls this directly

Calls 6

memoizeOneFunction · 0.90
arrayMap2Function · 0.90
matrixMap2Function · 0.90
matrixMap3Function · 0.90
pushMethod · 0.80
getStyleMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…