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

233
Vistas
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 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