Topic: select multiple don't render as expected

AlessioB free asked 1 year ago


Expected behavior As per the example from MDBootstrap site, select with multiple attribute must render as a select with options with checkbox

Actual behavior In my project, select with multiple attribute renders as list, without checkboxes. Multiple selection works as basic html control

There is no error or warning on browser's console

I included plugins with references

<script type="text/javascript" src="~/plugins/js/all.min.js"></script>
<link rel="stylesheet" href="~/plugins/css/all.min.css" />

Resources (screenshots, code snippets etc.)


AlessioB free answered 1 year ago


I'm sorry I mentioned only the plugins because I thought the problem could depend on that. Actually it seems to me that the select is not part of the plugins.

Below is the list of references in the layout

<!-- MDB ESSENTIAL -->
<link rel="stylesheet" href="~/css/mdb.min.css" />
<!-- MDB PLUGINS -->
<link rel="stylesheet" href="~/plugins/css/all.min.css" />
<!-- MDB ESSENTIAL -->
<script type="text/javascript" src="~/js/mdb.min.js"></script>
<!-- MDB PLUGINS -->
<script type="text/javascript" src="~/plugins/js/all.min.js"></script>
<!-- Custom styles -->
<link href="~/Content/Site.css" rel="stylesheet" />
<!-- jquery -->
<script src="~/Scripts/jquery-3.6.0.min.js"></script>

Grzegorz Bujański staff commented 1 year ago

Unfortunately, I am unable to reproduce this. Please add all the HTML code including both the imports and the code for the component that does not work.


Grzegorz Bujański staff answered 1 year ago


It looks like you imported the plugin but did not add an import for MDB Pro. Add the missing imports, that should fix the problem.

<script type="text/javascript" src="~/js/mdb.min.js"></script>
<link rel="stylesheet" href="~/css/mdb.min.css" />


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 Standard
  • MDB Version: MDB5 3.9.0
  • Device: PC
  • Browser: Edge
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No