Interface
The static methods of a widget.
Properties
Property | Type | Notes |
---|---|---|
getFullConfig | (config: any) => any | A widget can just save partial of its config in an app config. In the runtime, the widget can use this function to get the full config. |
mapExtraStateProps | (state: IMState, ownProps: Partial<AllWidgetProps<any>>) => any | If a widget needs more state, it can use this function to map the state to the props. |
versionManager | BaseVersionManager | The version manager of a widget (optional) |
getFullConfig
getFullConfig: (config: any) => any
A widget can just save partial of its config in an app config. In the runtime, the widget can use this function to get the full config.
Type declaration
function(config: any): any
Parameters
Parameter | Type | Notes |
---|---|---|
config | any | The config saved in the app config |
Returns
any
The full config
mapExtraStateProps
mapExtraStateProps: (state: IMState, ownProps: Partial<AllWidgetProps<any>>) => any
If a widget needs more state, it can use this function to map the state to the props.
Type declaration
function(state: IMState, ownProps: Partial<AllWidgetProps<any>>): any
Parameters
Parameter | Type | Notes |
---|---|---|
state | IMState | The app state |
own | Partial<AllWidgetProps<any>> | The widget props |
Returns
any
versionManager
versionManager: BaseVersionManager
The version manager of a widget (optional)