Topic: MultiSelect issue

innovative23 pro asked 5 years ago


Hey there, so I have an issue utilizing the multiselect component. Here's the story. When a user select items, the multiple items appear. Which is great but then moves on to the next page and later revisits the same page where the multiselect component is at. The options the user has selected disappear. The normal select component  works great! But why does the multiselect component behaves this way? Thank you! I can provide sample code if needed.

Jakub Mandra staff answered 5 years ago


Hi there,   When user visits another page and goes back, the view rerenders, so the whole component rerenders. If you don't store the select's options somewhere (state, redux) it should reset to the default. At least that is how I see the situation. Stranger is that the normal select keeps it's state... Any sugestions how to improve the component are welcome :)   Best, Jakub

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

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.7.1
  • Device: Laptop
  • Browser: Chrome and IE
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No