Skip to main content

Interface: UpdateOptions\<T>

services.UpdateOptions

Options for updating a toast notification, with optional render content.

Type parameters

NameType
Tunknown

Hierarchy

Table of contents

Properties

Properties

autoClose

Optional autoClose: null | number | false

Set the delay in ms to close the toast automatically. Use false to prevent the toast from closing. Default: 5000

Inherited from

Nullable.autoClose

Defined in

src/services/toastService.ts:48


bodyStyle

Optional bodyStyle: null | CSSProperties

An optional inline style to apply for the toast content.

Inherited from

Nullable.bodyStyle

Defined in

src/services/toastService.ts:64


closeOnClick

Optional closeOnClick: null | boolean

Remove the toast when clicked. Default: true

Inherited from

Nullable.closeOnClick

Defined in

src/services/toastService.ts:42


containerId

Optional containerId: null | string

Set id to handle multiple container

Inherited from

Nullable.containerId

Defined in

src/services/toastService.ts:95


data

Optional data: null | T

Inherited from

Nullable.data

Defined in

src/services/toastService.ts:156


delay

Optional delay: null | number

Add a delay in ms before the toast appear.

Inherited from

Nullable.delay

Defined in

src/services/toastService.ts:154


draggable

Optional draggable: null | boolean

Allow toast to be draggable Default: true

Inherited from

Nullable.draggable

Defined in

src/services/toastService.ts:75


draggableDirection

Optional draggableDirection: null | DraggableDirection

Specify in which direction should you swipe to dismiss the toast Default: "x"

Inherited from

Nullable.draggableDirection

Defined in

src/services/toastService.ts:85


draggablePercent

Optional draggablePercent: null | number

The percentage of the toast's width it takes for a drag to dismiss a toast Default: 80

Inherited from

Nullable.draggablePercent

Defined in

src/services/toastService.ts:80


hideProgressBar

Optional hideProgressBar: null | boolean

Hide or show the progress bar. Default: false

Inherited from

Nullable.hideProgressBar

Defined in

src/services/toastService.ts:69


icon

Optional icon: ToastIcon

Used to display a custom icon. Set it to false to prevent the icons from being displayed

Inherited from

Nullable.icon

Defined in

src/services/toastService.ts:112


isLoading

Optional isLoading: null | boolean

Inherited from

Nullable.isLoading

Defined in

src/services/toastService.ts:155


onClick

Optional onClick: null | (event: MouseEvent\<Element, MouseEvent>) => void

Deprecated

⚠️ Will be removed in the next major release. You can pass a react component with you handler instead.

Fired when clicking inside toaster

Inherited from

Nullable.onClick

Defined in

src/services/toastService.ts:102


onClose

Optional onClose: null | \<T>(props: T) => void

Deprecated

⚠️ Will be removed in the next major release. You can rely on toast.onChange instead.

Called when toast is unmounted.

Inherited from

Nullable.onClose

Defined in

src/services/toastService.ts:129


onOpen

Optional onOpen: null | \<T>(props: T) => void

Deprecated

⚠️ Will be removed in the next major release. You can rely on toast.onChange instead.

Called when toast is mounted.

Inherited from

Nullable.onOpen

Defined in

src/services/toastService.ts:122


pauseOnFocusLoss

Optional pauseOnFocusLoss: null | boolean

Pause the toast when the window loses focus. Default: true

Inherited from

Nullable.pauseOnFocusLoss

Defined in

src/services/toastService.ts:37


pauseOnHover

Optional pauseOnHover: null | boolean

Pause the timer when the mouse hover the toast. Default: true

Inherited from

Nullable.pauseOnHover

Defined in

src/services/toastService.ts:32


position

Optional position: null | ToastPosition

Set the default position to use. One of: 'top-right', 'top-center', 'top-left', 'bottom-right', 'bottom-center', 'bottom-left' Default: 'top-right'

Inherited from

Nullable.position

Defined in

src/services/toastService.ts:54


progress

Optional progress: null | string | number

Set the percentage for the controlled progress bar. Value must be between 0 and 1.

Inherited from

Nullable.progress

Defined in

src/services/toastService.ts:150


progressStyle

Optional progressStyle: null | CSSProperties

An optional style to set for the progress bar.

Inherited from

Nullable.progressStyle

Defined in

src/services/toastService.ts:59


render

Optional render: ToastContent\<T>

Used to update a toast. Pass any valid ReactNode(string, number, component)

Defined in

src/services/toastService.ts:182


role

Optional role: null | string

Define the ARIA role for the toast Default: alert https://www.w3.org/WAI/PF/aria/roles

Inherited from

Nullable.role

Defined in

src/services/toastService.ts:91


rtl

Optional rtl: null | boolean

Support right to left display. Default: false

Inherited from

Nullable.rtl

Defined in

src/services/toastService.ts:107


style

Optional style: null | CSSProperties

An optional inline style to apply.

Inherited from

Nullable.style

Defined in

src/services/toastService.ts:133


toastId

Optional toastId: null | string

Set a custom toastId

Inherited from

Nullable.toastId

Defined in

src/services/toastService.ts:142


type

Optional type: null | TypeOptions

Set the toast type. One of: 'info', 'success', 'warning', 'error', 'default'

Inherited from

Nullable.type

Defined in

src/services/toastService.ts:138


updateId

Optional updateId: null | string

Used during update

Inherited from

Nullable.updateId

Defined in

src/services/toastService.ts:146