Topic: React router with mdb steppers

Paul TP free asked 3 years ago


Is it possible to attach react router with mdb steppers? so that when the user clicks next button it also changes the react router url. for example from "mainForm" to "mainForm/contact


Piotr Glejzer staff commented 3 years ago

You can try to replace anchors to the MDBLink component. Are you a pro user?


Paul TP free commented 3 years ago

Yes, my company has a pro version that we are using


Piotr Glejzer staff commented 3 years ago

so did you try use mdblink with routing?


Paul TP free commented 3 years ago

@Piotr Glejzer Yes I did try like and I when I click the stepper icon it does change the url but does not display the view. I would like to share the code with you but I do not know how, I have tried pasting my code here but do not see it after pushing the comment.


Paul TP free commented 3 years ago

@Piotr Glejzer using MDBLink with onClick this method swapFormActive(1)(2) seems to be working but when I refresh the pages it takes me to step 1 even though the url says "/mainForm/contact/". I think this is caused by the initial state that is set to 1. is there a way where I can fix this behavior?


Piotr Glejzer staff commented 3 years ago

which example do you use? Did you try to change this state somehow?


Paul TP free commented 3 years ago

@Piotr Glejzer I used Steps within form example. I set the initial state like this: formActivePanel1: 1,


Piotr Glejzer staff commented 3 years ago

I will try to check it as soon as possible in that case.


Paul TP free commented 3 years ago

@Piotr Glejzer did you have some time to check this?


Piotr Glejzer staff commented 3 years ago

I added task to check it.



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Opened

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.27.0
  • Device: Laptop
  • Browser: chrome
  • OS: Linux Fedora
  • Provided sample code: No
  • Provided link: No