MCPcopy Create free account
hub / github.com/Autodesk/react-base-table / getMainColumns

Method getMainColumns

src/ColumnManager.js:72–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70 }
71
72 getMainColumns() {
73 return this._cache('mainColumns', () => {
74 const columns = this.getVisibleColumns();
75 if (!this.hasFrozenColumns()) return columns;
76
77 const mainColumns = [];
78 this.getLeftFrozenColumns().forEach(column => {
79 //columns placeholder for the fixed table above them
80 mainColumns.push({ ...column, [ColumnManager.PlaceholderKey]: true });
81 });
82 this.getVisibleColumns().forEach(column => {
83 if (!column.frozen) mainColumns.push(column);
84 });
85 this.getRightFrozenColumns().forEach(column => {
86 mainColumns.push({ ...column, [ColumnManager.PlaceholderKey]: true });
87 });
88
89 return mainColumns;
90 });
91 }
92
93 getLeftFrozenColumns() {
94 return this._cache('leftFrozenColumns', () => {

Callers 1

BaseTable.jsFile · 0.80

Calls 5

_cacheMethod · 0.95
getVisibleColumnsMethod · 0.95
hasFrozenColumnsMethod · 0.95
getLeftFrozenColumnsMethod · 0.95
getRightFrozenColumnsMethod · 0.95

Tested by

no test coverage detected