Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: MDBSelect error on empty data

clickstudioltd priority asked 2 years 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