| 244 | * ℹ️ The `useGridRef` and `useGridCallbackRef` hooks are exported for convenience use in TypeScript projects. |
| 245 | */ |
| 246 | export interface GridImperativeAPI { |
| 247 | /** |
| 248 | * Outermost HTML element for the grid if mounted and null (if not mounted. |
| 249 | */ |
| 250 | get element(): HTMLDivElement | null; |
| 251 | |
| 252 | /** |
| 253 | * Scrolls the grid so that the specified row and column are visible. |
| 254 | * |
| 255 | * @param behavior Determines whether scrolling is instant or animates smoothly |
| 256 | * @param columnAlign Determines the horizontal alignment of the element within the list |
| 257 | * @param columnIndex Index of the column to scroll to (0-based) |
| 258 | * @param rowAlign Determines the vertical alignment of the element within the list |
| 259 | * @param rowIndex Index of the row to scroll to (0-based) |
| 260 | * |
| 261 | * @throws RangeError if an invalid row or column index is provided |
| 262 | */ |
| 263 | scrollToCell: ({ |
| 264 | behavior, |
| 265 | columnAlign, |
| 266 | columnIndex, |
| 267 | rowAlign, |
| 268 | rowIndex |
| 269 | }: { |
| 270 | behavior?: "auto" | "instant" | "smooth"; |
| 271 | columnAlign?: "auto" | "center" | "end" | "smart" | "start"; |
| 272 | columnIndex: number; |
| 273 | rowAlign?: "auto" | "center" | "end" | "smart" | "start"; |
| 274 | rowIndex: number; |
| 275 | }) => void; |
| 276 | |
| 277 | /** |
| 278 | * Scrolls the grid so that the specified column is visible. |
| 279 | * |
| 280 | * @param align Determines the horizontal alignment of the element within the list |
| 281 | * @param behavior Determines whether scrolling is instant or animates smoothly |
| 282 | * @param index Index of the column to scroll to (0-based) |
| 283 | * |
| 284 | * @throws RangeError if an invalid column index is provided |
| 285 | */ |
| 286 | scrollToColumn: ({ |
| 287 | align, |
| 288 | behavior, |
| 289 | index |
| 290 | }: { |
| 291 | align?: "auto" | "center" | "end" | "smart" | "start"; |
| 292 | behavior?: "auto" | "instant" | "smooth"; |
| 293 | index: number; |
| 294 | }) => void; |
| 295 | |
| 296 | /** |
| 297 | * Scrolls the grid so that the specified row is visible. |
| 298 | * |
| 299 | * @param align Determines the vertical alignment of the element within the list |
| 300 | * @param behavior Determines whether scrolling is instant or animates smoothly |
| 301 | * @param index Index of the row to scroll to (0-based) |
| 302 | * |
| 303 | * @throws RangeError if an invalid row index is provided |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…