Function useListAction

Provides a set of actions and hooks for managing a list of data.

  • Type Parameters

    Parameters

    • params: IParams<Data>

      The parameters for configuring the list actions.

    Returns {
        commitAction: ((p?: string) => Promise<null | void>);
        commitRowAction: ((action: string, row: Data) => Promise<null | void>);
        deselectAll: (() => void);
        listProps: {
            onSelectedRows: ((rowIds: RowId[]) => void);
            selectedRows: RowId[];
        };
        selectedRows: RowId[];
    }

    • The list actions and necessary data.
    • commitAction: ((p?: string) => Promise<null | void>)
        • (p?): Promise<null | void>
        • Parameters

          • Optionalp: string

          Returns Promise<null | void>

    • ReadonlycommitRowAction: ((action: string, row: Data) => Promise<null | void>)
        • (action, row): Promise<null | void>
        • Parameters

          • action: string
          • row: Data

          Returns Promise<null | void>

    • deselectAll: (() => void)
        • (): void
        • Returns void

    • listProps: {
          onSelectedRows: ((rowIds: RowId[]) => void);
          selectedRows: RowId[];
      }
      • ReadonlyonSelectedRows: ((rowIds: RowId[]) => void)
          • (rowIds): void
          • Parameters

            Returns void

      • selectedRows: RowId[]
    • selectedRows: RowId[]