Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

162
Visualizações
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 Respostas
Responde à pergunta

0

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

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda