()
| 116 | } |
| 117 | |
| 118 | ngOnInit() { |
| 119 | this._syncColumnDefName(); |
| 120 | |
| 121 | if (this.headerText === undefined) { |
| 122 | this.headerText = this._createDefaultHeaderText(); |
| 123 | } |
| 124 | |
| 125 | if (!this.dataAccessor) { |
| 126 | this.dataAccessor = |
| 127 | this._options.defaultDataAccessor || ((data: T, name: string) => (data as any)[name]); |
| 128 | } |
| 129 | |
| 130 | if (this._table) { |
| 131 | // Provide the cell and headerCell directly to the table with the static `ViewChild` query, |
| 132 | // since the columnDef will not pick up its content by the time the table finishes checking |
| 133 | // its content and initializing the rows. |
| 134 | this.columnDef.cell = this.cell; |
| 135 | this.columnDef.headerCell = this.headerCell; |
| 136 | this._table.addColumnDef(this.columnDef); |
| 137 | } else if (typeof ngDevMode === 'undefined' || ngDevMode) { |
| 138 | throw getTableTextColumnMissingParentTableError(); |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | ngOnDestroy() { |
| 143 | if (this._table) { |
nothing calls this directly
no test coverage detected