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: Material Select- How to set default value?

dxl pro asked 7 years ago


This is a pretty common scenario, so it should be supported. Instead of showing placeholder option, I want to preselect an option.


Jacopo Gucciardi priority answered 4 years ago


I've found this solution to work fine

$('#mySelect option[value="optionValue"]').attr("selected", true);

Damian Gemza staff answered 7 years ago


Hello dear dxl, Please check that link. Here you can read about how to implement default selection in Material Select. https://mdbootstrap.com/support/default-value-select-angular/ Best Regards, Damian

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: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags