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

232
Visualizações
react-bootstrap-typeahead default styling

I am trying to use react-bootstrap-typeahead in my project. The problem is that formatting looks pretty awful. I tried running the exact same code in an online sandbox. There it looks fine.

enter image description here

At first i thought that the sandbox is applying explicit styles, but that does not seem to be the case. As far as i can tell, it is using the default styling of the typeahead competent instead of applying heavy formatting. https://codesandbox.io/s/9jq9jyzmry

I suspect that something in my app is overriding the styling used by the typeahead and leading to it being improperly rendered.

I realize it is possible to apply custom formatting to the typeahead, but that feels laborious. Is there a way to force default styling on the typeahead?

For reference, here's the code:

import React, { useState } from 'react';
import { Typeahead } from 'react-bootstrap-typeahead';

const MyPicker = () => {
  const [selected, setSelected] = useState([]);
  const handleChange = (sel) => setSelected(sel);
  return (
    <div>
      <Typeahead
        multiple
        clearButton
        id="my-typeahead"
        labelKey="fullname"
        onChange={handleChange}
        options={[
          {
            fullname: 'Apple',
          },
          {
            fullname: 'Banana',
          },
          {
            fullname: 'Peach',
          },
          {
            fullname: 'Zucchini',
          },
        ]}
        placeholder="Select options..."
        selected={selected}
      />
    </div>
  );
};

export default MyPicker;
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