MDBSelect does not show search.

Topic: MDBSelect does not show search.

Malasharhan free asked 2 years ago

Expected behavior

I want to show search in MDBSelect. My code is as follow

   <MDBSelect className="my-0" outline search searchLabel="Write here" selected={values.jobRoleId} getValue={val => {
       helpers.triggerChangeEvent("jobRoleId", val[0]) }}>
      <MDBSelectInput selected={t("COMMON.VALUES.UNDEFINED")} />
        <MDBSelectOption disabled>{t("COMMON.VALUES.UNDEFINED")}</MDBSelectOption>
            {, index) => (
              <MDBSelectOption key={index} value={} checked={values.jobRoleId ==}>{item[`jobRole_${lang}`]}</MDBSelectOption>

Actual behavior

But does not show Searchbar

Jakub Chmura staff answered 2 years ago

Hi @Malasharhan,

The search bar in MDBSelect is only available when you use select with data array.

In the example above you use our select with markup.

Please check our documentation for more information:

Best, Kuba

Please insert min. 20 characters.


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



Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.25.2
  • Device: PC
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No