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

313
Visualizações
React-Select: Values ​are not shown correctly

I'm creatin ga select in a f orm in which the values are recover from api.

Now my problem is the select didn't show all the values in right way, so I can find the values, but it doesn't appears in the list (as it is cutted)

enter image description here

as you can see it is not shown correctly.

 const listaRealmTrovata = async () => {
        await axios.get(`${apiUrlRealm}?deletedDate.specified=false`)
            .then(
                (resp) => {
                    // recupero in questo modo la lista dei realm attivi
                    resp.data.map(res => {
                        console.log("res ", res)
                        setListaRealm(listaRealm => [...listaRealm, { value: res.id, label: res.realmId }])
                    })
                }
            )
    }

    useEffect(() => {
        listaRealmTrovata()
    }, [])

    return (
    <div>
        <div className="container">
            <Row className="justify-content-center">
                <Col md="8">
                    <h2>
                  Create                        </h2>
                </Col>
            </Row>


            <AvForm model={{}} onSubmit={saveEntity}>
                <Row>
                    <Col md="12">
                        <div style={{ marginTop: 50, marginBottom: 50 }}>
                            <Label for="realm">
                                Realm
                            </Label>
                            <Select options={listaRealm.length > 0 ? listaRealm : null} isMulti className="select-custom-class" />
                        </div>
                    </Col>
                </Row>

                <div className="container my-3">
                    <div className="col-md-12 text-center" style={{ marginTop: 30 }} >
                        <Button color="primary" id="save-entity" data-cy="entityCreateSaveButton" type="submit" style={{}}>
                            Save
                        </Button>
                    </div>
                </div>
            </AvForm>
        </div>
    </div>

How can I fix? thank you

Edit:

I have tried to use:

const customStyles = { option: (provided, state) => ({ padding: 5, }), }

and I can see more values, but don't all values..

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