| 505 | |
| 506 | /** Public (imperative) methods of a `Table` instance. */ |
| 507 | export interface TableImperativeAPI { |
| 508 | /** |
| 509 | * Forcefully re-render the inner `Grid` component. |
| 510 | * |
| 511 | * Calling `forceUpdate` on `Table` may not re-render the inner `Grid` since it uses `shallowCompare` as a performance optimization. |
| 512 | * Use this method if you want to manually trigger a re-render. |
| 513 | * This may be appropriate if the underlying row data has changed but the row sizes themselves have not. |
| 514 | */ |
| 515 | forceUpdateGrid(): void; |
| 516 | |
| 517 | /** |
| 518 | * Gets offset for a given row and alignment (`align`; `alignment` is a deprecated alias). |
| 519 | * The alignment defaults to "auto"; an index of `-1` (the default) refers to the last row. |
| 520 | */ |
| 521 | getOffsetForRow(params?: { |
| 522 | align?: Alignment; |
| 523 | /** @deprecated Use `align` instead. */ |
| 524 | alignment?: Alignment; |
| 525 | index?: number; |
| 526 | }): number; |
| 527 | |
| 528 | /** |
| 529 | * Gets the scrollbar width used to pad the table-header. |
| 530 | */ |
| 531 | getScrollbarWidth(): number; |
| 532 | |
| 533 | /** |
| 534 | * Invalidate the size of a row (after the current render has been committed); see `Grid#invalidateCellSizeAfterRender`. |
| 535 | * This method is intended for `CellMeasurer`. |
| 536 | */ |
| 537 | invalidateCellSizeAfterRender(params: CellPosition): void; |
| 538 | |
| 539 | /** |
| 540 | * Pre-measure all rows in a `Table`. |
| 541 | * |
| 542 | * Typically rows are only measured as needed and estimated heights are used for cells that have not yet been measured. |
| 543 | * This method ensures that the next call to getTotalSize() returns an exact size (as opposed to just an estimated one). |
| 544 | */ |
| 545 | measureAllRows(): void; |
| 546 | |
| 547 | /** |
| 548 | * Recompute row heights and offsets after the specified index (defaults to 0). |
| 549 | * |
| 550 | * `Table` has no way of knowing when its underlying list data has changed since it only receives a `rowHeight` property. |
| 551 | * If the `rowHeight` is a number it can compare before and after values but if it is a function that comparison is error prone. |
| 552 | * In the event that a dynamic `rowHeight` function is in use and the row heights have changed this function should be manually called by the "smart" container parent. |
| 553 | * |
| 554 | * This method will also force a render cycle (via `forceUpdate`) to ensure that the updated measurements are reflected in the rendered table. |
| 555 | */ |
| 556 | recomputeRowHeights(index?: number): void; |
| 557 | |
| 558 | /** |
| 559 | * Recompute row heights and offsets after the specified row index (defaults to 0); see `Grid#recomputeGridSize`. |
| 560 | * (The column index is ignored.) This method is intended for `CellMeasurer`; also see `recomputeRowHeights`. |
| 561 | */ |
| 562 | recomputeGridSize(params?: Partial<CellPosition>): void; |
| 563 | |
| 564 | /** |
no outgoing calls
no test coverage detected