From 05e8255ffa52820614f680ff37094c3c67720848 Mon Sep 17 00:00:00 2001 From: bdebon Date: Mon, 25 Oct 2021 16:39:16 +0200 Subject: [PATCH 1/2] Adding a payload property in the IndividualConfig interface to pass data to toastComponent --- src/lib/toastr/toastr-config.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/toastr/toastr-config.ts b/src/lib/toastr/toastr-config.ts index 46333d94..ed8e3ad8 100644 --- a/src/lib/toastr/toastr-config.ts +++ b/src/lib/toastr/toastr-config.ts @@ -98,6 +98,12 @@ export interface IndividualConfig { * default: true */ newestOnTop: boolean; + + /** + * payload to pass to the toastComponent + * default: null + */ + payload: any; } export interface ToastrIconClasses { From f2a87e65872139f1dcdbf3338e7ba97d8062cdc0 Mon Sep 17 00:00:00 2001 From: bdebon Date: Mon, 25 Oct 2021 18:06:12 +0200 Subject: [PATCH 2/2] Giving an initial value to payload in DefaultNoComponentGlobalConfig --- src/lib/toastr/toastr-config.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/toastr/toastr-config.ts b/src/lib/toastr/toastr-config.ts index ed8e3ad8..9adeab3f 100644 --- a/src/lib/toastr/toastr-config.ts +++ b/src/lib/toastr/toastr-config.ts @@ -236,6 +236,8 @@ export const DefaultNoComponentGlobalConfig: GlobalConfig = { tapToDismiss: true, onActivateTick: false, progressAnimation: 'decreasing', + + payload: null }; export interface ToastToken {