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

229
Vistas
How to unselect the menu.item (ant) if using the menu inside one component?

i have used menu and menu.item from ant , but im facing one issue BC im using one react component to draw the menu for a list array that includes menus and submenus .

enter image description here

this how it's look

and this is my code

 <StyledCollapse ghost>
          {categoriesTree ? (
            categoriesTree.map((item, index) => {
              return (
                <Panel key={index} header={<StyledCategoryRow>{item.name}</StyledCategoryRow>}>
                  <StyledMenu multiple={false}>
                    {item.names.map((category, index) => {
                      return (
                        <StyledPlanMenuItem key={index}>
                          <Row align="middle" gutter={[8, 0]}>
                            <Col span={24}>
                              <Link to={getUrl(`/${category.name.replace(/\s/g, '')}`)}>
                                {category.name}
                              </Link>
                            </Col>
                          </Row>
                        </StyledPlanMenuItem>
                      );
                    })}
                  </StyledMenu>
                </Panel>
              );
            })
          ) : (
            <Spin />
          )}
        </StyledCollapse>

i want to select only one menu.item at one time

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

0

  1. Make sure that there are no duplicate keys. 2.Still if the issue doesn't resolve you can use refs from react to handle click event. for more you can take reference from official site: https://reactjs.org/docs/hooks-reference.html#useref
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