Scroll smoothly to the right (#4735)
This commit is contained in:
parent
7be620775e
commit
f59ed3a4fa
2 changed files with 16 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue