| 274 | * ℹ️ The `useGridRef` and `useGridCallbackRef` hooks are exported for convenience use in TypeScript projects. |
| 275 | */ |
| 276 | export interface GridImperativeAPI { |
| 277 | /** |
| 278 | * Outermost HTML element for the grid if mounted and null (if not mounted. |
| 279 | */ |
| 280 | get element(): HTMLDivElement | null; |
| 281 | |
| 282 | /** |
| 283 | * Scrolls the grid so that the specified row and column are visible. |
| 284 | * |
| 285 | * @param behavior Determines whether scrolling is instant or animates smoothly |
| 286 | * @param columnAlign Determines the horizontal alignment of the element within the list |
| 287 | * @param columnIndex Index of the column to scroll to (0-based) |
| 288 | * @param rowAlign Determines the vertical alignment of the element within the list |
| 289 | * @param rowIndex Index of the row to scroll to (0-based) |
| 290 | * |
| 291 | * @throws RangeError if an invalid row or column index is provided |
| 292 | */ |
| 293 | scrollToCell: ({ |
| 294 | behavior, |
| 295 | columnAlign, |
| 296 | columnIndex, |
| 297 | rowAlign, |
| 298 | rowIndex |
| 299 | }: { |
| 300 | behavior?: "auto" | "instant" | "smooth"; |
| 301 | columnAlign?: "auto" | "center" | "end" | "smart" | "start"; |
| 302 | columnIndex: number; |
| 303 | rowAlign?: "auto" | "center" | "end" | "smart" | "start"; |
| 304 | rowIndex: number; |
| 305 | }) => void; |
| 306 | |
| 307 | /** |
| 308 | * Scrolls the grid so that the specified column is visible. |
| 309 | * |
| 310 | * @param align Determines the horizontal alignment of the element within the list |
| 311 | * @param behavior Determines whether scrolling is instant or animates smoothly |
| 312 | * @param index Index of the column to scroll to (0-based) |
| 313 | * |
| 314 | * @throws RangeError if an invalid column index is provided |
| 315 | */ |
| 316 | scrollToColumn: ({ |
| 317 | align, |
| 318 | behavior, |
| 319 | index |
| 320 | }: { |
| 321 | align?: "auto" | "center" | "end" | "smart" | "start"; |
| 322 | behavior?: "auto" | "instant" | "smooth"; |
| 323 | index: number; |
| 324 | }) => void; |
| 325 | |
| 326 | /** |
| 327 | * Scrolls the grid so that the specified row is visible. |
| 328 | * |
| 329 | * @param align Determines the vertical alignment of the element within the list |
| 330 | * @param behavior Determines whether scrolling is instant or animates smoothly |
| 331 | * @param index Index of the row to scroll to (0-based) |
| 332 | * |
| 333 | * @throws RangeError if an invalid row index is provided |
nothing calls this directly
no outgoing calls
no test coverage detected