Topic: Preserve Case With Editable Selects

jiffe free asked 3 years ago


Is there a way to preserve case with respect to select option values when adding a new option to an editable select (or just not add a value="" to the option) ? The option text preserves case but there is a value="..." added which ends up being all lowercase.


Tomek Makowski staff commented 3 years ago

Hi

Could you be more clear, I'm not sure what you mean or show your case in the snippet editor

https://mdbootstrap.com/snippets/

Regards


Tomek Makowski staff answered 3 years ago


Yes, this is a known bug, we have it already in our "to do" list.

We will fix it soon.

Best, Tomek


jiffe free answered 3 years ago


I see where this is happening in the mdb code:

e = $('<option value="'.concat(t.toLowerCase(), '" selected>').concat(t, "</option>")).prop("selected", !0);

jiffe free answered 3 years ago


The example would be https://mdbootstrap.com/docs/jquery/forms/select/ under 'Adding new options'

Say you add a new option "Option 4" and then look at the updated in the DOM. I am getting <option value="option 4" selected="">Option 4</option> where the value has lowercased the O in Option.



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 jQuery
  • MDB Version: 4.19.1
  • Device: PC
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No