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

261
Vistas
how to autoselect by ip format in semantic ui and how to prevent autoslect of added ones in dropdown

enter image description here enter image description here Setting the forceSelection property to false fixes this problem but then when I manually add it myself as 5.5.5.5 it is not selected

enter image description here

When I enter 5.5.5.5 and click anywhere I want it to be added. how can I do that

  ipDropdown.dropdown({
            action: function (text, value,$selectedItem) {
               if (/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(value)) {
                  $(this).dropdown('set selected', value);
                   
               }
               else if (_.isEmpty(ipDropdown.dropdown('get value'))) 
               {
                   
               }
            },
            allowAdditions: true,
            forceSelection: true,
            allowReselection:true,
            onAdd: function (value, text) {
               
                ipList.push(text); 
            },
            onRemove: function (value, text) {
                ipList = arrayRemove(ipList, text)
            },
        });

about 4 years ago · Juan Pablo Isaza
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