ExpressionResolverComponentProps
Interface
The ExpressionResolverComponent component props.
Properties
Property | Type | Notes |
---|---|---|
ReactNode | ResolverRenderFunction | If one of children components' rendering depends on the resolved result, you can choose to use this render function. | |
Expressions that need to be resolved. | ||
{ [dataSourceId: string]: DataRecord[] } | If included, it will use these | |
ImmutableArray<UseDataSource> | Widget's | |
string | Id of the widget. |
expression
Interface Propertyexpression: IMExpression | IMExpressionMap
Expressions that need to be resolved.
records
records: { [dataSourceId: string]: DataRecord[] }
If included, it will use these records
to resolve the expression.
If not, it will use useDataSources
to create the data source instances, then use these data sources to resolve the expression.
Must pass in one of useDataSources
and records
.
Type declaration
- [dataSourceId: string]: DataRecord[]
useDataSources
useDataSources: ImmutableArray<UseDataSource>
Widget's useDataSources
, the data sources that the widget is using.
If the data source of one expression part is not in the array, this part will not be resolved.
Must pass in one of useDataSources
and records
.
Methods
Method | Returns | Notes |
---|---|---|
onChange(resolvedResults) | void | Whether or not the expression is resolved successfully, the function will be called. |
onChange
onChange(resolvedResults: MultipleExpressionResolveResults | SingleExpressionResolveResult): void
Whether or not the expression is resolved successfully, the function will be called.
Parameters
Parameter | Type |
---|---|
resolved | MultipleExpressionResolveResults | SingleExpressionResolveResult |
Returns
void
children: ReactNode | ResolverRenderFunction
If one of children components' rendering depends on the resolved result, you can choose to use this render function.