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: Disabled MDBSelect

DevPaulLeon free asked 5 years ago


Hello!

Is there some way to set enabled=false to MDBSelect?

I need this because of validation!

Thanks!


Piotr Glejzer staff answered 5 years ago


Hi,

Yes, It is possible. You can check our API about MDBSelect. https://mdbootstrap.com/docs/react/forms/select/

Top page, a blue bar with API link. https://ibb.co/1f3XR5h

There are options with arrays and you can set a disabled property to this object in the array.

Best,Piotr


DevPaulLeon free commented 5 years ago

So, the only way to do this is to set every option to disabled?


Piotr Glejzer staff commented 5 years ago

I think so, there is API documentation where you can see what can you use. What do you exactly need?


DevPaulLeon free commented 5 years ago

I want to disabled MDBSelect!

For example, if an input is disabled it doesn't even catch focus. So, that's the behavior that I want for my MDBSelect! With the solution that you are proposing me, the MDBSelect is going to show its options, of course I won't be able to click any of them beacuse all of them are disabled. But, the expected behavior is that the MDBSelect (which contain options) mustn't show any option, it must have the input css style.

I hope this pen can help

https://codepen.io/DevPaulLeon/pen/abbVyLP


Piotr Glejzer staff commented 5 years ago

Ok, I understand now. Sorry about that misunderstanding. Hmm, I think this is no possible to do it now. Sorry about that. We will do refactoring this component in the nearly future. I will do a fast workaround about that for you in my free time. Best,Piotr



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: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.22.0
  • Device: PC
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No