* Returns property name that corresponds with the given column index. * * @param {string|number} column Visual column index or another passed argument. * @returns {string|number} Column property, physical column index or passed argument.
(column: number)
| 262 | * @returns {string|number} Column property, physical column index or passed argument. |
| 263 | */ |
| 264 | colToProp(column: number) { |
| 265 | // TODO: Should it work? Please, look at the test: |
| 266 | // "it should return the provided property name, when the user passes a property name as a column number". |
| 267 | if (Number.isInteger(column) === false) { |
| 268 | return column; |
| 269 | } |
| 270 | |
| 271 | const physicalColumn = this.hot!.toPhysicalColumn(column); |
| 272 | |
| 273 | // Out of range, not visible column index. |
| 274 | if (physicalColumn === null) { |
| 275 | return column; |
| 276 | } |
| 277 | |
| 278 | // Cached property. |
| 279 | if (this.colToPropCache && isDefined(this.colToPropCache[physicalColumn])) { |
| 280 | return this.colToPropCache[physicalColumn]; |
| 281 | } |
| 282 | |
| 283 | return physicalColumn; |
| 284 | } |
| 285 | |
| 286 | /** |
| 287 | * Translates property into visual column index. |
no test coverage detected