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

rohitgoyal7 picture rohitgoyal7  路  3Comments

will88 picture will88  路  3Comments

BradyEdgar94 picture BradyEdgar94  路  3Comments

artemidas picture artemidas  路  4Comments

slashwhatever picture slashwhatever  路  3Comments