import { ReactElement } from "react"; export interface TableExpandableRowsProps { /** * The rows that expanding the surrounding `Table.Row` reveals. Renders nothing * when `undefined` or empty, so a leaf row needs no conditional of its own. */ items?: Iterable; /** * Values that invalidate the cached rows, like a hook's dependency array. * Rendered rows are cached per item object, so anything the render function * reads from outside the item — state, a lookup, a prop — has to be listed * here or it renders stale. Needed on every level of the table separately. */ dependencies?: ReadonlyArray; /** * Render function for a single nested row. Usually the same function that * renders the parent row, called recursively. */ children: (item: T) => ReactElement; }