Christian Cazzaro pro asked 2 months ago


Hi

In the stepper, when the step is completed the step number simply turns green. How can I change the step number with an icon check when the step is completed instead?

Thanks


Grzegorz Bujański staff answered 2 months ago


You can do it using one of the available events:

const steps = document.querySelectorAll('.stepper .stepper-step');
steps.forEach((step) => {
  step.addEventListener('onChangeStep.mdb.stepper', () => {
    step.querySelector('.stepper-head-icon').innerHTML = '<i class="fas fa-check"></i>';
  });
});


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • User: Pro
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 4.4.0
  • Device: MacBook Pro
  • Browser: Chrome
  • OS: iOS
  • Provided sample code: No
  • Provided link: No