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

175
Vistas
How can I disable React-Select dropdown values from showing when clicking icons?

Using react-select we have some options that have a callback and when clicked open a separate modal. We've created a custom MultiValueLabel which has a callback to the onedit

MultiValueLabel: props => {
    const { classes } = props.selectProps as unknown as CustomSelectProps;
    const item = props.data as InternalCustomSelectItem;
    return (
        <div {...props.innerProps} onClick={item.onEdit} title={item.title ?? item.name}>
            {item.icon && <div className={classes.valueIcon}>{item.icon}</div>}
            {item.name}
        </div>
    );
},

The callback looks something like this:

    onEdit: async (groupKey: string) => {
        const groupForEdit = (await groupForEdit(groupKey)).value;
        return dispatch(ModalActions.showModal(CommonModalTypes.filterModal, { editingGroup: groupForEdit }));
    },

I would like to stop the other options from appearing when clicking these objects because showing the modal AND the dropdowns is a lot going on when really the modal is the only thing actionable.

I've tried a few variations of e.stopPropagation(); or e.preventDefault(); but none of them seem to stop the options from appearing. Anyone done something similar?

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