Scroll smoothly to the right (#4735)

This commit is contained in:
abcang 2017-08-30 00:06:19 +09:00 committed by Eugen Rochko
parent 7be620775e
commit f59ed3a4fa
2 changed files with 16 additions and 2 deletions

View file

@ -26,5 +26,5 @@ const scroll = (node, key, target) => {
};
};
export const scrollRight = (node) => scroll(node, 'scrollLeft', node.scrollWidth);
export const scrollRight = (node, position) => scroll(node, 'scrollLeft', position);
export const scrollTop = (node) => scroll(node, 'scrollTop', 0);