React-slick: appendArrows feature is not implemented yet

Created on 27 Feb 2018  路  3Comments  路  Source: akiran/react-slick

enhancement

Most helpful comment

customArrows allows you to change the markup of the arrows but doesn't allow you to reposition it within the parent component...

All 3 comments

Not a clear impact after customArrows, so not going to be implemented.

customArrows allows you to change the markup of the arrows but doesn't allow you to reposition it within the parent component...

Have same problem, is solved ease with ReactDOM.createPortal, example from my project:

interface IArrowProps extends CustomArrowProps {
    container: HTMLElement | null;
}

const NextArrow = ({container, ...props}: IArrowProps) => {
    const arrow = (
        <XArrowButton
            {...props}
            parentClass="gallery"
            modifier="collection"
            direction={ArrowButtonDirections.Right}
        />
    );

    return container ? ReactDOM.createPortal(arrow, container) : arrow;
};
Was this page helpful?
0 / 5 - 0 ratings

Related issues

vugman picture vugman  路  3Comments

enriquelopez-atlas picture enriquelopez-atlas  路  3Comments

AlmogRnD picture AlmogRnD  路  4Comments

amishPro picture amishPro  路  3Comments

rohitgoyal7 picture rohitgoyal7  路  3Comments