Topic: MDBSelect error on empty data

clickstudioltd priority asked 1 year ago


Expected behavior

No errors.

Actual behavior

I get this error in console when I pass an empty array to MDBSelect. This error is shown when you open the list and there are no items:

Uncaught TypeError: reduce of empty array with no initial value

Resources (screenshots, code snippets etc.)

<MDBSelect data={[]} search required />


Thank you for reporting this. We will take a closer look at this soon. For now, you could disable Select, while the array is empty.



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: Priority
  • Premium support: Yes
  • Technology: MDB React
  • MDB Version: MDB5 3.0.0
  • Device: PC
  • Browser: Mozilla Firefox
  • OS: Windows 10
  • Provided sample code: Yes
  • Provided link: No