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

293
Vistas
Customizing material ui autocompete

I'm using the material-UI Autocomplete component in my react app and I want to show a div when hovering on an option from the list (like in the image)

Show image

any help with that, please

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

0

you need to use the renderOption attribute with a Tooltip like this :

import React from "react";
import TextField from "@material-ui/core/TextField";
import Autocomplete from "@material-ui/lab/Autocomplete";
import { Button, Tooltip } from "@material-ui/core";
import { Info } from "@material-ui/icons";



export default function ComboBox() {
      const defaultProps = {
        options: top100Films,
        getOptionLabel: option => option.title
      };
    
      return (
        <Autocomplete
          {...defaultProps}
          id="list-option"
          debug
          ListboxComponent={props => <div {...props} />}
          getOptionDisabled={({ year }) => year > 2000}
          renderOption={({ title, year, ...props }) => {
            return (
              <div>
                <Tooltip title={`Too Old ${year}`} placement="bottom">
                  <div>
                    <Button endIcon={<Info />} component="li" {...props} fullWidth>
                      {title} - {year}
                    </Button>
                  </div>
                </Tooltip>
              </div>
            );
          }}
          renderInput={params => (
            <TextField
              {...params}
              label="Broken Disabled Tooltips"
              margin="normal"
              fullWidth
            />
          )}
        />
      );
    }
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