Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49083

IonSlides with useState

$
0
0

Hi, i have this code.

<IonSlides key="elSlide" pager={true} options={slideOpts}>
                    {infoDeportista.imagenes.map((imagen) => {
                      return (
                        <IonSlide
                          onClick={() => {
                            setInfoDeportista({
                              ...infoDeportista,
                              imagenes: infoDeportista.imagenes?.filter(
                                (foto) => foto.id !== imagen.id
                              ),
                            });
                          }}
                          key={String(imagen.id)}
                          style={{ position: "relative" }}
                          className="ion-padding"
                        >
                          <img className="bordeRedondo" src={imagen.url}></img>
                        </IonSlide>
                      );
                    })}
                  </IonSlides>

I want that when i click on the slide, the slider disappear. but im getting this error.
Uncaught DOMException: Node.removeChild: The node to be removed is not a child of this node
Only happens with the ionSlide… if i remove it works fine… greetings

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49083

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>