Topic: Fields with labels in collapse display error

David priority asked 5 months ago


I am seeing odd behaviour when putting input fields under any type of collapse or Accordion.

I would expect the field with the label to work as it does if I move the field anywhere in the code outside the collapse, however if the field has its value populated already and its inside a collapse, the label does not display correctly as the field border cuts through it.

Clicking in the field corrects the label but I cant find any other way to correct it.

code snippet: https://mdbootstrap.com/snippets/standard/david-mansfieldwhitecode-co-uk/6070824


Kamila Pieńkowska staff answered 5 months ago


Width of the label is calculated for visible elements. You need to update input labels after collapse opens (the same applies to accordion): https://mdbootstrap.com/snippets/standard/kpienkowska/6072127


David priority answered 5 months ago


Amazing, thank you for that, it was driving me nuts!



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 Standard
  • MDB Version: MDB5 7.2.0
  • Device: PC/Mobile
  • Browser: Chrome & Edge
  • OS: Windows/Android
  • Provided sample code: No
  • Provided link: Yes