akiran / akiran/react-slick

Arrows elements are polluted

オープン
#2,051 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
11.9k
フォーク
2.1k
PR マージ指標
30日以内にマージされた PR はありません

説明

### 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]`_

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。