Topic: MDBSelect sets props to a wrapping div

Roman Mzh priority asked 5 years ago


Expected behavior

A hidden select element with name

Actual behavior

wrapping div with given name O_o

Resources (screenshots, code snippets etc.)

Source code

result


Aliaksandr Andrasiuk staff answered 5 years ago


Hi,

Our realization of the Select varies from the default HTML. We don't use default HTML Select.

Some of our's Select properties sets as HTML attributes because we don't use all the props you pass for logic actions inside the Select component. Some necessary properties get destructured and participates in logic inside of Select, rest properties passes to the wrapper(div) using spread operator. The name property is not involed into logic action, so it's goes to rest and sets as HTML attribute.

Hope I could explain how it works.

Best regards.


Aliaksandr Andrasiuk staff answered 5 years ago


Hi,

Select component has a div wrapper. And properties which are not important for our component functionality are signified as rest parameters and they are passed to wrapper (div).

If it is necessary we can rethink the approach of name property.

Hope I could help.

Best regards.


Roman Mzh priority commented 5 years ago

Hi, @Aliaksandr Andrasiuk.

Check my screenshot, please. A wrapping div got options prop and set them as html attribute! And also there is no select at all :(



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: 4.18.0
  • Device: pc
  • Browser: chrome
  • OS: ubuntu 18.04
  • Provided sample code: No
  • Provided link: No