Multiselect

roots48 asked 6 years ago

Expected behavior When there are no items selected I want the selectinput (That I supply, in this case "Test") default (disabled) text to be shown

Example:<MDBSelect> <MDBSelectInput selected="Test" /> <MDBSelectOptions> <MDBSelectOption disabled>Test</MDBSelectOption> <MDBSelectOption value="1">Option 1</MDBSelectOption> <MDBSelectOption value="2">Option 2</MDBSelectOption> <MDBSelectOption value="3">Option 3</MDBSelectOption> <MDBSelectOption value="4">Option 4</MDBSelectOption> <MDBSelectOption value="5">Option 5</MDBSelectOption> </MDBSelectOptions> </MDBSelect>

Actual behavior The text is always "Choose your option" when no values are selected.. Resources (screenshots, code snippets etc.) I believe the problem lies within this piece of code of mdbreact.esm.js if (text.length === 0) { text = "Choose your option"; }


Jakub Mandra staff premium answered 6 years ago

Hi,

Thanks for reporting. Some bugs broke in in the last release. We will fix it immediately, but it will be released in next mdbreact version.

Please don't hesitate to ask me for further details.

Best,

Jakub


Adrian answered 6 years ago

Hi,

I'm using the mdbreact-4.13.0 version and I have the same problem that roots48.

This is my example:

<MDBSelect multiple>
  <MDBSelectInput selected="Choose, please" />
  <MDBSelectOptions search>
    <MDBSelectOption value="one">One</MDBSelectOption>
    <MDBSelectOption value="one">Two</MDBSelectOption>
    <MDBSelectOption value="one">Three</MDBSelectOption>
  </MDBSelectOptions>
</MDBSelect>

Although I'm expecting that the input's value would be Choose, please, the actual rendered value is Choose your option. This doesn't happen if I remove the multiselect prop.

Thanks!


Jakub Mandra staff premium commented 6 years ago

Hello,

Thanks for the report, we will take a closer look at that immediately.

Best,

Jakub


Hello,

May i ask if the MDBootstrap multiselect React page have a bug? We are doing a project and needed it. We've tried copying the actual code provided in the website but unfortunately we've encountered an issue:

We've copied the multiselect with markup and it doesn't run correctly in our page. In the MDBootstrap website it has a Select All option but in our end the multiselect turns into a Single Select.

Another question: Can the multiselect handles a limit on when to show the total number of selected files?

For example we selected 3 options but when selecting the 4th options the value displayed will be the total options selected.

If the option selected is more than 3 that's when the will appear.

I'll be waiting for your reply, we needed to finish our tasks ASAP.

Thank you very much.


Jakub Mandra staff premium commented 6 years ago

The discussion has been moved to this post: https://mdbootstrap.com/support/react/multiselect-dropdown-3ecf5/


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
  • User: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.11.0
  • Device: Web
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No