Basaingeal / Razor.SweetAlert2

A Razor class library for interacting with SweetAlert2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Themes sometimes don't work

Basaingeal opened this issue · comments

Theming currently only works when the Swal service is injected after page load. So if the load page does not have a component that injects SweetAlertService and then a component that does is loaded, it will work. But if the loaded page has a Swal component, it will not work.

This is because currently, setting the theme is done dynamically via JSInterop in the SweetAlertService constructor. This works well if there's already a page to manipulate, but before the fact it doesn't.

Need to somehow run the process after page load, or re-work all together.

If nothing works, a manual link tag may be needed, and the relevant documentation will be provided.