File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 overflow : hidden ;
1616 height : 30px ;
1717 padding : 4px 6px 4px 2px ;
18- cursor : pointer ;
1918 border-left : 4px solid transparent ;
2019}
2120
Original file line number Diff line number Diff line change @@ -50,7 +50,6 @@ export default class DataBrowserHeaderBar extends React.Component {
5050 setSelectedObjectId,
5151 setCurrent,
5252 stickyLefts,
53- handleLefts,
5453 freezeIndex,
5554 showRowNumber,
5655 rowNumberWidth,
@@ -120,6 +119,11 @@ export default class DataBrowserHeaderBar extends React.Component {
120119 className += ` ${ styles . preventSort } ` ;
121120 }
122121
122+ let handleClassName = styles . handle ;
123+ if ( freezeIndex >= 0 && i === freezeIndex ) {
124+ handleClassName += ` ${ styles . handleFreeze } ` ;
125+ }
126+
123127 elements . push (
124128 < div
125129 onClick = { onClick }
@@ -136,28 +140,14 @@ export default class DataBrowserHeaderBar extends React.Component {
136140 index = { i }
137141 moveDataBrowserHeader = { this . props . handleDragDrop }
138142 />
143+ < DragHandle
144+ key = { 'handle' + i }
145+ className = { handleClassName }
146+ onDrag = { onResize . bind ( null , i ) }
147+ onClick = { e => e . stopPropagation ( ) }
148+ />
139149 </ div >
140150 ) ;
141- const handleStyle = { } ;
142- if ( freezeIndex >= 0 && typeof handleLefts [ i ] !== 'undefined' && i <= freezeIndex ) {
143- handleStyle . position = 'sticky' ;
144- handleStyle . left = handleLefts [ i ] ;
145- handleStyle . zIndex = 11 ;
146- if ( i === freezeIndex ) {
147- handleStyle . marginRight = 0 ;
148- handleStyle . width = 4 ;
149- } else {
150- handleStyle . background = wrapStyle . background ;
151- }
152- }
153- elements . push (
154- < DragHandle
155- key = { 'handle' + i }
156- className = { styles . handle }
157- onDrag = { onResize . bind ( null , i ) }
158- style = { handleStyle }
159- />
160- ) ;
161151 } ) ;
162152
163153 if ( onAddColumn ) {
Original file line number Diff line number Diff line change 1818 display : block ;
1919 min-width : 100% ;
2020 width : max-content ;
21- // to resolve rendering issue with retina displays
22- -webkit-transform : translate3d (0 , 0 , 0 );
23- will-change : transform ;
2421}
2522
2623.wrap {
24+ position : relative ;
2725 display : inline-block ;
2826 vertical-align : top ;
27+ cursor : pointer ;
2928}
3029
3130.addColumn {
7170}
7271
7372.handle {
74- position : relative ;
75- display : inline-block ;
76- width : 8px ;
73+ position : absolute ;
74+ right : -8px ;
75+ top : 0 ;
76+ width : 16px ;
7777 height : 30px ;
78- margin : 0 -4px ;
79- cursor : ew-resize ;
78+ z-index : 2 ;
79+ cursor : col-resize ;
80+ background : rgba (255 , 255 , 255 , 0 );
81+ transition : background 0.15s ease ;
82+
83+ & :hover {
84+ background : rgba (255 , 255 , 255 , 0.15 );
85+ }
86+ }
87+
88+ .handleFreeze {
89+ right : -4px ;
90+ width : 8px ;
8091}
8192
8293.pickerPointer {
Original file line number Diff line number Diff line change @@ -120,7 +120,6 @@ export default class BrowserTable extends React.Component {
120120 } ) ) ;
121121
122122 const stickyLefts = [ ] ;
123- const handleLefts = [ ] ;
124123 const maxRowNumber =
125124 this . props . skip + ( this . props . data ? this . props . data . length : this . props . limit ) ;
126125 const rowNumberWidth = this . props . showRowNumber
@@ -130,7 +129,6 @@ export default class BrowserTable extends React.Component {
130129 let left = 30 + rowNumberWidth ;
131130 headers . forEach ( ( h , i ) => {
132131 stickyLefts [ i ] = left ;
133- handleLefts [ i ] = left + h . width ;
134132 if ( h . visible ) {
135133 left += h . width ;
136134 }
@@ -620,7 +618,6 @@ export default class BrowserTable extends React.Component {
620618 }
621619 headers = { headers }
622620 stickyLefts = { stickyLefts }
623- handleLefts = { handleLefts }
624621 freezeIndex = { this . props . freezeIndex }
625622 freezeColumns = { this . props . freezeColumns }
626623 unfreezeColumns = { this . props . unfreezeColumns }
You can’t perform that action at this time.
0 commit comments