Source

admin-bro/src/frontend/hooks/use-selected-records/use-selected-records-result.type.ts

import { RecordJSON } from '../../interfaces'

/**
 * Result of the {@link useSelectedRecords} hook.
 * It is a object containing multiple tools you can use in your component
 * @memberof useSelectedRecords
 * @alias UseSelectedRecordsResult
 */
export type UseSelectedRecordsResult = {
  /** Array of selected records */
  selectedRecords: Array<RecordJSON>;
  /** Sets selected records */
  setSelectedRecords: (records: Array<RecordJSON>) => void;
  /** handler function for single select action */
  handleSelect: (record: RecordJSON) => void;
  /** handler function for `select all records` action */
  handleSelectAll: () => void;
}
SoftwareBrothers

Proudly built and maintained by SoftwareBrothers

Software House with a passion for both JavaScript and TypeScript.

See what we do See what we believe in

Proudly built and maintained by

SoftwareBrothers