@@ -26,9 +26,6 @@ class Views extends TableView {
26
26
super ( ) ;
27
27
this . section = 'Core' ;
28
28
this . subsection = 'Views' ;
29
- this . contentRef = React . createRef ( ) ;
30
- this . headerRef = React . createRef ( ) ;
31
- this . syncHeaderPosition = this . syncHeaderPosition . bind ( this ) ;
32
29
this . state = {
33
30
views : [ ] ,
34
31
counts : { } ,
@@ -52,21 +49,6 @@ class Views extends TableView {
52
49
. then ( ( ) => this . loadViews ( this . context ) ) ;
53
50
}
54
51
55
- componentDidMount ( ) {
56
- this . syncHeaderPosition ( ) ;
57
- window . addEventListener ( 'scroll' , this . syncHeaderPosition ) ;
58
- window . addEventListener ( 'resize' , this . syncHeaderPosition ) ;
59
- }
60
-
61
- componentDidUpdate ( ) {
62
- this . syncHeaderPosition ( ) ;
63
- }
64
-
65
- componentWillUnmount ( ) {
66
- window . removeEventListener ( 'scroll' , this . syncHeaderPosition ) ;
67
- window . removeEventListener ( 'resize' , this . syncHeaderPosition ) ;
68
- }
69
-
70
52
componentWillReceiveProps ( nextProps , nextContext ) {
71
53
if ( this . context !== nextContext ) {
72
54
this . props . schema
@@ -192,13 +174,12 @@ class Views extends TableView {
192
174
return (
193
175
< div >
194
176
< LoaderContainer loading = { loading } >
195
- < div className = { tableStyles . content } ref = { this . contentRef } > { content } </ div >
177
+ < div className = { tableStyles . content } > { content } </ div >
196
178
</ LoaderContainer >
197
179
{ toolbar }
198
180
< div
199
181
className = { tableStyles . headers }
200
182
style = { { width : this . state . tableWidth , right : 'auto' } }
201
- ref = { this . headerRef }
202
183
>
203
184
{ headers }
204
185
</ div >
@@ -351,14 +332,6 @@ class Views extends TableView {
351
332
this . props . navigate ( path ) ;
352
333
}
353
334
354
- syncHeaderPosition ( ) {
355
- if ( ! this . headerRef . current || ! this . contentRef . current ) {
356
- return ;
357
- }
358
- const left = this . contentRef . current . getBoundingClientRect ( ) . left ;
359
- this . headerRef . current . style . left = `${ left } px` ;
360
- }
361
-
362
335
showNote ( message , isError ) {
363
336
if ( ! message ) {
364
337
return ;
0 commit comments