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

164
Vistas
Hide certain enum values from users

I am trying to create a dropdown-list where you can select current employees from. However, in order to not invalidate old data, the names of old employees should also be valid entrances for the field. I am new to alpacajs, however i was thinking about doing something like this:

.alpaca({
    "data": "Coffee2",
    "options": {
        "label": "Ice cream",
        "optionLabels": ["", "Chocolate", "Coffee"] //Here i would want e.g. that Vanilla was hidden from the user.
    },
    "schema": {
        "required": true,
        "enum": ["Vanilla", "Chocolate", "Coffee"]
    }
});

This solution however would then make it so you would not see the former employees names on previous data but only " ". I have also thought about doing it with observables, however i cannot get it to work.

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

0

You can use de element "disallow": ['property'], to remove the elements from the list

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