akiran / akiran/react-slick

Arrows elements are polluted

Abierto
#2,051 1 comentario 1 reacción 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
11.9k
Forks
2.1k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### Problem
When using arrows (`arrows: true`), elements used in `nextArrow` and `prevArrow` are polluted. Their `className` is changed entirely. Used Chrome DevTools to check the class list.

### Expected behaviour
Either:
a) embed the passed element in some `div` or
b) make the library append required classes (`slick-arrow`, `slick-next`) instead overwriting whole class list (the same would be with other fields possibly(?)).
c) add `nextArrowClassName`/`rightArrowClassName` (but its stupid tbh)

### Example code
https://codesandbox.io/s/react-slick-playground-forked-lew3o?file=/index.js
The example code includes part of https://react-slick.neostack.com/docs/example/custom-arrows .

### Workaround
Embed the passed element in dummy `div`. By the way, React `Fragment` won't do ('<>`).

_Tags: `[Not critical]`, `[Quality of Life]`_

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.