* Creates a default header text. Use the options' header text transformation function if one * has been provided. Otherwise simply capitalize the column name.
()
| 150 | * has been provided. Otherwise simply capitalize the column name. |
| 151 | */ |
| 152 | _createDefaultHeaderText() { |
| 153 | const name = this.name; |
| 154 | |
| 155 | if (!name && (typeof ngDevMode === 'undefined' || ngDevMode)) { |
| 156 | throw getTableTextColumnMissingNameError(); |
| 157 | } |
| 158 | |
| 159 | if (this._options && this._options.defaultHeaderTextTransform) { |
| 160 | return this._options.defaultHeaderTextTransform(name); |
| 161 | } |
| 162 | |
| 163 | return name[0].toUpperCase() + name.slice(1); |
| 164 | } |
| 165 | |
| 166 | /** Synchronizes the column definition name with the text column name. */ |
| 167 | private _syncColumnDefName() { |
no test coverage detected