Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Providing multiple classes in positionClass fails #938

Open
RahulBadenkal opened this issue Jun 7, 2022 · 0 comments
Open

Providing multiple classes in positionClass fails #938

RahulBadenkal opened this issue Jun 7, 2022 · 0 comments

Comments

@RahulBadenkal
Copy link

This is the config i am working with

export const COMMON_TOAST_OVERRIDE: Partial<GlobalConfig> = {
	positionClass: 'admin-container toast-bottom-right', // all toasts container
	toastClass: 'admin-single-toastr-container', // single toast container
	newestOnTop: false,
	maxOpened: 3,
	autoDismiss: true,
	tapToDismiss: false,
	timeOut: 3000,
	extendedTimeOut: 3000
	// disableTimeOut: 'extendedTimeOut'
};

But adding more than 1 class in positionClass field fails with the following error in console

ERROR DOMException: Failed to execute 'add' on 'DOMTokenList': The token provided ('admin-container toast-bottom-right') contains HTML space characters, which are not valid in tokens.
    at Overlay._createPaneElement (http://localhost:4200/vendor.js:71170:24)
    at Overlay.getPaneElement (http://localhost:4200/vendor.js:71159:76)
    at Overlay.create (http://localhost:4200/vendor.js:71152:44)
    at ToastrService._buildNotification (http://localhost:4200/vendor.js:71437:41)
    at ToastrService._preBuildNotification (http://localhost:4200/vendor.js:71410:21)
    at ToastrService.show (http://localhost:4200/vendor.js:71312:21)
    at http://localhost:4200/testmanagement-testManagement-module.js:135373:42
    at SafeSubscriber._next (http://localhost:4200/main.js:16704:48)
    at SafeSubscriber.__tryOrUnsub (http://localhost:4200/vendor.js:86042:16)
    at SafeSubscriber.next (http://localhost:4200/vendor.js:85981:22)
    at Subscriber._next (http://localhost:4200/vendor.js:85931:26)
    at Subscriber.next (http://localhost:4200/vendor.js:85908:18)
    at MapSubscriber._next (http://localhost:4200/vendor.js:90473:26)
    at MapSubscriber.next (http://localhost:4200/vendor.js:85908:18)
    at FilterSubscriber._next (http://localhost:4200/vendor.js:89986:30)
    at FilterSubscriber.next (http://localhost:4200/vendor.js:85908:18)
    at MergeMapSubscriber.notifyNext (http://localhost:4200/vendor.js:90709:26)
    at SimpleInnerSubscriber._next (http://localhost:4200/vendor.js:86296:21)
    at SimpleInnerSubscriber.next (http://localhost:4200/vendor.js:85908:18)
    at XMLHttpRequest.onLoad (http://localhost:4200/vendor.js:13256:30)
    at XMLHttpRequest.sentryWrapped (http://localhost:4200/assets/js/sentryConfigRec.js:369:23)
    at ZoneDelegate.invokeTask (http://localhost:4200/polyfills.js:521:35)
    at Object.onInvokeTask (http://localhost:4200/vendor.js:41584:33)
    at ZoneDelegate.invokeTask (http://localhost:4200/polyfills.js:520:40)
    at Zone.runTask (http://localhost:4200/polyfills.js:289:51)
    at ZoneTask.invokeTask [as invoke] (http://localhost:4200/polyfills.js:602:38)
    at invokeTask (http://localhost:4200/polyfills.js:1743:18)
    at XMLHttpRequest.globalZoneAwareCallback (http://localhost:4200/polyfills.js:1780:25)

Is there any way i can add more than 1 class to the container of all toastrs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant