File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " react-virtualized-sticky-tree" ,
3
3
"description" : " A React component for efficiently rendering tree like structures with support for position: sticky" ,
4
- "version" : " 2.0.15 " ,
4
+ "version" : " 2.0.16 " ,
5
5
"author" : " Marc McIntyre <marchaos@gmail.com>" ,
6
6
"license" : " MIT" ,
7
7
"main" : " dist/commonjs/index.js" ,
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import PropTypes from 'prop-types' ;
3
+ import vendorSticky from './vendorSticky' ;
3
4
4
5
export default class StickyTree extends React . PureComponent {
5
6
@@ -450,7 +451,7 @@ export default class StickyTree extends React.PureComponent {
450
451
getClientNodeStyle ( node ) {
451
452
const style = { height : node . height } ;
452
453
if ( node . isSticky ) {
453
- style . position = 'sticky' ;
454
+ style . position = vendorSticky ( ) ;
454
455
style . top = node . stickyTop ;
455
456
style . zIndex = node . zIndex ;
456
457
}
Original file line number Diff line number Diff line change
1
+ export default ( ) => {
2
+ if ( / S a f a r i / . test ( navigator . userAgent ) && / A p p l e C o m p u t e r / . test ( navigator . vendor ) ) {
3
+ return '-webkit-sticky' ;
4
+ }
5
+
6
+ return 'sticky' ;
7
+ }
You can’t perform that action at this time.
0 commit comments