notiflix / Notiflix

Notiflix is a pure JavaScript library for client-side non-blocking notifications, popup boxes, loading indicators, and more that makes your web projects much better.

Home Page:https://notiflix.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEAT] - Change message of Loading dynamically

JenuelDev opened this issue · comments

Is your feature request related to a problem? Please describe.

Able to change the message of loading. Let's say for example there is 3 API request to run, and for each API request,

Describe the solution you'd like

I want them to change the Loading message from something like:

  1. Verifying your Identity
  2. Creating your Account
  3. Preparing your dashboard.

after it is prepared, it will then remove the loading state.

Describe alternatives you've considered

None

Additional context

None

I think you did not get what I am trying to achieve... lets say for example,, I click a button submit..

when I clicked the submit..

a loader appear.. like Loader.standard("Verifying your Identiyyu"); while processing an API request for verifying the identity.

if the verification is successfull,,, then a new API will process, but still I like the loader to continue loading,, but I only want the Loading message to change.. so Loader.standart('creating your account'),, and so on and so fort..

if everything is processed that is the time on calling Loading.remove()

my problem is, the message is not changing.. how do I do that?

commented

Hello @BroJenuel ,

I shared the link because there is a method as change() and I believe that it will be helpful for you.

Screenshot 2023-02-20 at 19 07 39

// started
Notiflix.Loading.standard('Loading...');

// your stuff

Notiflix.Loading.change('Still Loading...');

// your stuff

Notiflix.Loading.change('Yes, Still Loading...');

// your stuff

// done
Notiflix.Loading.remove();

awesome thanks mate