Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

290
Vistas
Materialize CSS - multiple select with disabled selected issue

Even on official MaterializeCSS page for Select when you select a value for multiple select you see the disabled selected "Choose your Option" and then the selected option(s).

enter image description here

It seems to me more user friendly to shoe only Option 1 as "Choose your option" is not a valid option.

I use the

      <option value="" disabled selected>Choose your option</option>

so once page is rendered the user got a hint what is required of them.

Working jsFiddle.

It seems to me that using jQuery solves this issue (see an example) but I am using pure javascript only.

So the question is How to not display disabled, selected text for multiple MaterializeCSS select.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Copied from your js fiddle , this will fix your unselect issue.

function  onSelectChange(s){
  const elOptions = s.querySelectorAll('option')
  elOptions[0].removeAttribute('selected') // this won't work
  elOptions[0].selected  = false; ///this will - tested //first option will be unselected
}
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda