MCPcopy
hub / github.com/angular/components / constructor

Method constructor

src/aria/grid/grid-cell.ts:120–144  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

118 });
119
120 constructor() {
121 // Note: we don't go through host bindings for these, because the
122 // effect allows us to batch the reads together which drastically
123 // improves rendering performance in large grids (see #32759).
124 afterRenderEffect({
125 write: () => {
126 const {_pattern: pattern, _toggleAttribute: toggle} = this;
127 const rowSpan = pattern.rowSpan();
128 const colSpan = pattern.colSpan();
129 toggle('role', this.role());
130 toggle('id', pattern.id());
131 toggle('rowspan', rowSpan);
132 toggle('colspan', colSpan);
133 toggle('aria-rowspan', rowSpan);
134 toggle('aria-colspan', colSpan);
135 toggle('data-active', this.active());
136 toggle('data-anchor', pattern.anchor());
137 toggle('aria-disabled', pattern.disabled());
138 toggle('aria-rowindex', pattern.ariaRowIndex());
139 toggle('aria-colindex', pattern.ariaColIndex());
140 toggle('aria-selected', pattern.ariaSelected());
141 toggle('tabindex', this._tabIndex());
142 },
143 });
144 }
145
146 ngOnInit() {
147 this._row._collection.register(this);

Callers

nothing calls this directly

Implementers 1

GridCellPatternsrc/aria/private/grid/cell.ts

Calls 7

toggleFunction · 0.85
ariaSelectedMethod · 0.80
roleMethod · 0.45
idMethod · 0.45
activeMethod · 0.45
anchorMethod · 0.45
disabledMethod · 0.45

Tested by

no test coverage detected