react-spreadsheet-import icon indicating copy to clipboard operation
react-spreadsheet-import copied to clipboard

Incorrect step indicator if "initialStepState" is provided

Open samy-mssi opened this issue 1 year ago • 3 comments

Hi,

Just noticed this issue, when I provide the prop "initialStepState". Seems like https://github.com/UgnisSoftware/react-spreadsheet-import/issues/171 (that was solved)

Got the issue on version 4.6.1 sandbox link : https://codesandbox.io/p/sandbox/lucid-panna-43xql6

screenshot 1 image screenshot 2 image (back button doesn't work, but I can access to "match columns" step by hitting the "3" button in the Stepper, after this, everything is fine)

samy-mssi avatar Feb 02 '24 15:02 samy-mssi

+1 I also see this issue, however the variation of mine is exactly as in #171 .

agnar-nomad avatar Feb 13 '24 11:02 agnar-nomad

I am not sure if this is appropriate but it looks like an issue might be here: utils/steps.ts > line 25 > return Math.min(0, steps.indexOf(step)) seems to work correctly when changed to return Math.max(0, steps.indexOf(step)) With respect to the reporter's issue and mine as well.

agnar-nomad avatar Feb 13 '24 11:02 agnar-nomad