1
1
import * as React from 'react' ;
2
2
import styles from './ListView.DragDrop.module.scss' ;
3
+ import stickyHeaderstyles from './ListView.stickyHeader.module.scss' ;
3
4
import { DetailsList , DetailsListLayoutMode , Selection , SelectionMode , IGroup , IDetailsHeaderProps } from 'office-ui-fabric-react/lib/DetailsList' ;
4
5
import { IListViewProps , IListViewState , IViewField , IGrouping , GroupOrder } from './IListView' ;
5
6
import { IColumn , IGroupRenderProps , IObjectWithKey } from 'office-ui-fabric-react/lib/components/DetailsList' ;
@@ -9,7 +10,6 @@ import * as strings from 'ControlStrings';
9
10
import { IGroupsItems } from './IListView' ;
10
11
import * as telemetry from '../../common/telemetry' ;
11
12
import { Icon } from 'office-ui-fabric-react/lib/Icon' ;
12
- import './ListView.stickyHeader.css' ;
13
13
14
14
import filter from 'lodash/filter' ;
15
15
import { SearchBox } from 'office-ui-fabric-react/lib/SearchBox' ;
@@ -564,18 +564,6 @@ export class ListView extends React.Component<IListViewProps, IListViewState> {
564
564
this . dragCounter = 0 ;
565
565
}
566
566
}
567
-
568
- /**
569
- * Return Classname with StickyHeader
570
- */
571
- private _getClassName ( ) {
572
- if ( this . props . stickyHeader ) {
573
- return "StickyHeader" ;
574
- } else {
575
- return "" ;
576
- }
577
- }
578
-
579
567
/**
580
568
* Default React component render method
581
569
*/
@@ -623,7 +611,10 @@ export class ListView extends React.Component<IListViewProps, IListViewState> {
623
611
compact = { compact }
624
612
setKey = "ListViewControl"
625
613
groupProps = { groupProps }
626
- className = { this . _getClassName ( ) }
614
+ className = {
615
+ stickyHeader &&
616
+ stickyHeaderstyles . StickyHeader
617
+ }
627
618
/>
628
619
</ div >
629
620
) ;
0 commit comments