AlertingDialogStateProvider()
Home > @gooddata/sdk-ui-dashboard > AlertingDialogStateProvider
AlertingDialogStateProvider() function
This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Publishes the alerting create/edit dialog's state as the four alert state contexts once the dialog's data has loaded.
Mounts above the resolved AlertingDialogComponent, so the default dialog, a shell of blocks and a wholesale replacement all read the same state with no extra wiring. Defers mounting the state model itself until useAlertingDialogContext().isLoading is false, because the state model seeds its draft from the dialog's loaded data in useState initializers that never re-run — mounting earlier would freeze that seed against not-yet-loaded data.
Runs useIntl-calling hooks, so an IntlProvider must sit above it. Inside a Dashboard the ambient wrapper in DashboardInner supplies one with the same locale; a mount site without one throws in react-intl.
A custom AlertingDialogComponent that decorates the dialog context (re-provides AlertingDialogContextProvider with an adjusted value) must remount this provider beneath the decorated context, so the state is derived from the decorated value rather than the ambient one.
Signature:
export declare function AlertingDialogStateProvider(input: {
children: ReactNode;
}): import("react/jsx-runtime").JSX.Element;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
{ children } |
(not declared) | |
|
input |
{ children: ReactNode; } |
Returns:
import("react/jsx-runtime").JSX.Element