react-multi-carousel
react-multi-carousel copied to clipboard
Rtl support for custom button group
Hi @YIZHUANG
This is a tiny fix, only available for customButtonGroup
prop
Hi, so this doesn't work for the next and previous arrows?
No, i don't know all use cases, so i figured whoever wants RTL with custom buttons can enjoy it until the full RTL support will be resolved
@YIZHUANG any updates ?
@saharalon I plan to work on this soon!
cool thanks! waiting :)
@saharalon Thanks for your contribution. @YIZHUANG Can you please check this PR? It would be great having this feature for next release!
I tested this, it doesn't seem to work. I think it needs to support the current "next" and "previous" functionality for the default arrows as well. I see working on this feature requires some efforts, as the behaviour for keep tracking of the current slide needs to be changed as well and of course the infinite mode included. I just don't have that time for such a big task for now, if anyone's up for it, feel free to work on it.
Doesn't it work for customButtonGroup though ?
@saharalon Yeah, it doesn't seem to work. I am thinking maybe something like this could work:
public next(slidesHavePassed) {
if(this.props.RTL) {
this.previous(slidesHavePassed);
return;
}
}
Haven't tried if this work yet.
@YIZHUANG you actually don't need to change the behaviour.. only the direction the slides are going.
@YIZHUANG any updates ?
@saharalon Sorry haven't had the time yet, but i managed to give this a thought having an idea to rewrite this lib so that it can better handle features like this.
@YIZHUANG cool thanks! - waiting :)