react-virtualized-sticky-tree
Advanced tools
Comparing version 3.0.0-beta15 to 3.0.0-beta16
@@ -285,2 +285,8 @@ import React from 'react'; | ||
/** | ||
* Returns the scrollLeft of the scrollable element | ||
* | ||
* @return returns -1 if the elem does not exist. | ||
*/ | ||
getScrollLeft(): number; | ||
/** | ||
* Sets the scrollTop position of the scrollable element. | ||
@@ -291,2 +297,7 @@ * @param scrollTop | ||
/** | ||
* Sets the scrollLeft position of the scrollable element. | ||
* @param scrollLeft | ||
*/ | ||
setScrollLeft(scrollLeft: number): void; | ||
/** | ||
* Scrolls the node into view so that it is visible. | ||
@@ -293,0 +304,0 @@ * |
@@ -323,2 +323,10 @@ "use strict"; | ||
/** | ||
* Returns the scrollLeft of the scrollable element | ||
* | ||
* @return returns -1 if the elem does not exist. | ||
*/ | ||
getScrollLeft() { | ||
return this.elemRef.current ? this.elemRef.current.scrollLeft : -1; | ||
} | ||
/** | ||
* Sets the scrollTop position of the scrollable element. | ||
@@ -333,2 +341,11 @@ * @param scrollTop | ||
/** | ||
* Sets the scrollLeft position of the scrollable element. | ||
* @param scrollLeft | ||
*/ | ||
setScrollLeft(scrollLeft) { | ||
if (!isNaN(scrollLeft) && this.elemRef.current) { | ||
this.elemRef.current.scrollLeft = scrollLeft; | ||
} | ||
} | ||
/** | ||
* Scrolls the node into view so that it is visible. | ||
@@ -335,0 +352,0 @@ * |
{ | ||
"name": "react-virtualized-sticky-tree", | ||
"description": "A React component for efficiently rendering tree like structures with support for position: sticky", | ||
"version": "3.0.0-beta15", | ||
"version": "3.0.0-beta16", | ||
"author": "Marc McIntyre <marchaos@gmail.com>", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
62846
1239