DataSourceComponentProps

Interface

The DataSourceComponent component props.

Properties

children optional

children: string | number | boolean | object | DataRenderFunction | ReactElement<anystring | function | function> | ReactNodeArray | ReactPortal

If one of your children component's render depends on data source, please use this render function. Otherwise, even if the data record in the data source is changed, your children will not be re-rendered unless you connect the data source info in the children owner component to re-render the owner component.

See here for the difference between parent and owner context: https://gist.github.com/jimfb/0eb6e61f300a8c1b2ce7.

onCreateDataSourceFailed optional

onCreateDataSourceFailed: function

Failing to create data source will call the function.

Type declaration
    (errany): void
    Parameters
    • errany
    Returns 
    void

onDataSourceCreated optional

onDataSourceCreated: function

If one data source is used by mutiple widgets, every widget will receive the onDataSourceCreated callback.

Type declaration

onDataSourceInfoChange optional

onDataSourceInfoChange: function

Data source info changing will call the function.

Type declaration

onDataSourceSchemaChange optional

onDataSourceSchemaChange: function

If data source schema is changed, will call the function.

Type declaration
    (schemaImmutableObject<DataSourceSchema>, prevSchema?ImmutableObject<DataSourceSchema>): void
    Parameters
    • schemaImmutableObject<DataSourceSchema>
    • prevSchemaImmutableObject<DataSourceSchema>optional 
    Returns 
    void

query optional

query: QueryParams

Query parameters of queriable data source. The component does not execute a query without query property. To execute a query without adding new filter, please use an empty object: {}.

queryCount optional

queryCount: boolean

Whether query record count when query data records.

useDataSource

useDataSource: ImmutableObject<UseDataSource>

Data source used by widget.

widgetId optional

widgetId: string

Pass widgetId/localId if need to execute the query.

For main data source or data view, please use widgetId. For local data source, please use localId. The recommended localId is: widgetId + ???

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.