23 lines
1001 B
TypeScript
23 lines
1001 B
TypeScript
import type * as React from 'react';
|
|
import type { RefObject } from '@mui/x-internals/types';
|
|
import type { GridTreeNode } from "../gridRows.mjs";
|
|
import type { GridRowProApi } from "../api/index.mjs";
|
|
/**
|
|
* Get the ARIA attributes for a row
|
|
* @param {GridTreeNode} rowNode The row node
|
|
* @param {number} index The position index of the row
|
|
* @returns {React.HTMLAttributes<HTMLElement>} The ARIA attributes
|
|
*/
|
|
export type GetRowAriaAttributesFn = (rowNode: GridTreeNode, index: number) => React.HTMLAttributes<HTMLElement>;
|
|
export interface GridRowAriaAttributesInternalHook {
|
|
useGridRowAriaAttributes: () => GetRowAriaAttributesFn;
|
|
}
|
|
/**
|
|
* Overridable row methods interface, these methods could be overriden in a higher plan package.
|
|
*/
|
|
export interface GridRowsOverridableMethodsInternalHook<Api, Props> {
|
|
useGridRowsOverridableMethods: (apiRef: RefObject<Api>, props: Props) => {
|
|
setRowIndex: GridRowProApi['setRowIndex'];
|
|
setRowPosition: GridRowProApi['setRowPosition'];
|
|
};
|
|
} |