Displays a toast notification when invoked from a dashboard page or widget within a page.
を使用する。 config
parameter to:
Only one toast can be shown at a time. Requests to display toasts may be queued and the toast may not be displayed immediately, if another toast is currently shown.
注: When the timeout
parameter is set to none
(a toast that the user needs to close manually, or removed via code) the toast is rendered into the page layout and pushes the rest of the page down. When timeout
is set to normal
, the toast appears on top of other content on the page.
1
名称 | タイプ | 説明 |
---|---|---|
config | ToastConfig | Toast configuration options. |
名称 | タイプ | 説明 |
---|---|---|
action | ToastAction | Optional. Object representing a call-to-action that's displayed in the toast. |
メッセージ | ストリング | Text that appears in the toast. |
onCloseClick | Function | Optional. Callback function to run when the toast is closed by clicking its close button. |
onToastSeen | Function | Optional. Callback function to run when the toast is seen by the user. |
priority | ストリング | Priority of the toast. If several toasts are triggered at the same time, they're displayed in the order of their priority levels. Default: normal . Options: low , normal , high . |
timeout | ストリング | Whether the toast should disappear after a predefined timeout (6 seconds). Options: none , normal . |
タイプ | ストリング | Toast color and message type. Default: standard . Options: standard : Blue notification toast. success : Green success toast. warning : Yellow warning toast. error : Red error toast. |
名称 | タイプ | 説明 |
---|---|---|
onClick | Function | Callback function to run after the call-to-action is clicked. |
removeToastOnClick | boolean | Whether to remove the toast after the call-to-action is clicked. |
テキスト | ストリング | Text that appears in the call-to-action. |
uiType | ストリング | The type of call-to-action. Options: button , link |
1
The object returned by showToast
contains a function that can be used to remove the toast.
To set up a dashboard client, refer to the setup guide.
1
1
1