New to KendoReactStart a free 30-day trial

Options for the useGridAIRequest hook.

Definition

Package:@progress/kendo-react-grid

Properties

columns?

{ field: string; id?: string; values?: any[] }[]

The columns to include in the request.

gridRef?

null | Pick​<GridHandle, "getLeafDataItems" | "getTotal" | "exportAsPdf" | "props">

Reference to grid methods.

The current grid state.

Optional custom HTTP client. When provided, overrides the built-in fetch-based transport.

onExportPdf?

() => void

Callback fired when PDF export is requested.

onMessages?

(messages: string[], promptMessage: string, isRetry: boolean) => void

Callback fired when messages are received from AI.

Parameters:messagesstring[]promptMessage?stringisRetry?boolean

onPromptRequest?

(request: GridAIRequestData, isRetry: boolean) => void

Callback fired before the request is sent.

Parameters:requestGridAIRequestDataisRetry?boolean

onResponseError?

(error: any) => void

Callback fired when the response returns an error.

Parameters:errorany

onResponseSuccess?

(response: GridAIResponse​<any>, promptMessage: string, isRetry: boolean) => void

Callback fired when the response is received successfully.

Parameters:responseGridAIResponse​<any>promptMessage?stringisRetry?boolean

onStateChange?

(newState: GridAIState) => void

Callback fired when the grid state should be updated.

Parameters:newStateGridAIState

Additional HTTP request options.

The URL to send the AI request to.

role?

string

The role for the AI request. Defaults to 'user'.