[SalesForce] Progress indicator is not working in LWC

I have a progress indicator in below playground with 2 buttons next and previous
but when I click on next button the value of step changes but the path value doesn't change, can anyone please look and suggest what am I missing.

Playground

Best Answer

lightning-progress-indicator takes a string for the current-step... so all you need to do is call toString() on your current step.

Playground link

Here:

@track progressStep = 1;
@track progressStepString = "1";

nextPage () {
    this.progressStep++;
    this.progressStepString = this.progressStep.toString();
}
prevPage () {
    this.progressStep--;
    this.progressStepString = this.progressStep.toString();
}