import { type FunctionComponent } from 'react'; import { ExecuteQueryByWidgetIdProps } from '../../../props'; /** * Executes a query over the existing widget and renders a function as child component. * The child component is passed the state of the query as defined in {@link QueryByWidgetIdState}. * * This component takes the Children Prop Pattern and * offers an alternative approach to the {@link useExecuteQueryByWidgetId} hook. * * **Note:** Widget extensions based on JS scripts and add-ons in Fusion are not supported. * * @example * The example below executes a query over the existing dashboard widget with the specified widget and dashboard OIDs. * ```tsx * * { * ({data, isLoading, isError}) => { * if (isLoading) { * return
Loading...
; * } * if (isError) { * return
Error
; * } * if (data) { * console.log(data); * return
{`Total Rows: ${data.rows.length}`}
; * } * return null; * } * } *
* ``` * @param props - ExecuteQueryByWidgetId properties * @returns ExecuteQueryByWidgetId component * @group Fusion Assets * @fusionEmbed */ export declare const ExecuteQueryByWidgetId: FunctionComponent;