ISlotProps
Home > @gooddata/sdk-ui-dashboard > ISlotProps
ISlotProps interface
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.
Contract of a section-level slot: the default implementation and the exact props the default dialog would render it with.
The component a customer assigns to a slot is rendered as an element type, so its reference identity is load-bearing: define it at module scope (or memoize it), never inline in a render function — an inline definition gets a fresh identity on every render of the declaring component, which unmounts and remounts the region, losing focus and transient DOM state.
Render <Default {...defaultProps} /> inside your own markup to wrap the region rather than replace it; a slot that does not spread defaultProps onto Default loses the default behavior wired through them (including the dialog's initial-focus ref).
Signature:
export interface ISlotProps<TProps>
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
ComponentType<TProps> |
(ALPHA) The default implementation of the region. | ||
|
TProps |
(ALPHA) The exact props the default dialog would render ISlotProps.Default with. |