-
Notifications
You must be signed in to change notification settings - Fork 158
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
updateLoadingHtml isn't working #24
Comments
Is this project stopped? I confirm. UpdateLoadingHtml doesn't works |
I've forked the project and disabled transition support, which is the reason the |
I workaround this issue by performing direct DOM manipulation of HTML I want to change from initial one. setLoadingMessage(message: string) {
let element = document.querySelector('.pg-loading-html .loading-message');
if (element) {
element.innerHTML = message;
}
}
setLoadingError(error: boolean) {
let loadingElement = document.body;
if (loadingElement) {
if (error) {
loadingElement.classList.add('pg-loading-error');
} else {
loadingElement.classList.remove('pg-loading-error');
}
}
} |
When I call updateLoadingHtml, with or without the "immediate" flag set to true, my loading html disappears and is not replaced with a new one. I've discovered that it is due to the pg-removing class not being removed and the html thus having opacity: 0.
I debugged the code and found that the listener that captures the animation event, calls the method _changeLoadingHtml() which removes the pg-removing class, but then immediately puts it back again. This seems a little odd. Am I missing something, or is this a bug?
The text was updated successfully, but these errors were encountered: