bulma-steps icon indicating copy to clipboard operation
bulma-steps copied to clipboard

Trigger "Click" previous button doesn't work

Open alvisecastagna1 opened this issue 6 years ago • 1 comments

Hi, I'm trying to trigger the previous button by clicking another element, but nothing happen. Click works (console.log appear) but doesn't go back to previous step.

How can i fix?

Thanks

alvisecastagna1 avatar Jan 25 '19 15:01 alvisecastagna1

You could attach an EventListener to directly call previous_step.

const otherBackBtn = document.getElementById('other-prev-button');
const otherNextBtn = document.getElementById('other-next-button');

const mySteps = new bulmaSteps('#mySteps');

otherBackBtn.addEventListener('click', mySteps.previous_step.bind(mySteps), false);
otherNextBtn.addEventListener('click', mySteps.next_step.bind(mySteps), false);

Example jsfiddle

cawalch avatar May 05 '19 20:05 cawalch