Fixed: Series index table header when banners are shown
This commit is contained in:
parent
9dd967f2aa
commit
77816aebac
|
@ -10,6 +10,10 @@
|
||||||
flex: 4 0 110px;
|
flex: 4 0 110px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.banner {
|
||||||
|
flex: 0 0 379px;
|
||||||
|
}
|
||||||
|
|
||||||
.network {
|
.network {
|
||||||
composes: headerCell from 'Components/Table/VirtualTableHeaderCell.css';
|
composes: headerCell from 'Components/Table/VirtualTableHeaderCell.css';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
import classNames from 'classnames';
|
||||||
import { icons } from 'Helpers/Props';
|
import { icons } from 'Helpers/Props';
|
||||||
import IconButton from 'Components/Link/IconButton';
|
import IconButton from 'Components/Link/IconButton';
|
||||||
import VirtualTableHeader from 'Components/Table/VirtualTableHeader';
|
import VirtualTableHeader from 'Components/Table/VirtualTableHeader';
|
||||||
|
@ -37,7 +38,7 @@ class SeriesIndexHeader extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
showSearchAction,
|
showBanners,
|
||||||
columns,
|
columns,
|
||||||
onTableOptionChange,
|
onTableOptionChange,
|
||||||
...otherProps
|
...otherProps
|
||||||
|
@ -78,7 +79,10 @@ class SeriesIndexHeader extends Component {
|
||||||
return (
|
return (
|
||||||
<VirtualTableHeaderCell
|
<VirtualTableHeaderCell
|
||||||
key={name}
|
key={name}
|
||||||
className={styles[name]}
|
className={classNames(
|
||||||
|
styles[name],
|
||||||
|
name === 'sortTitle' && showBanners && styles.banner
|
||||||
|
)}
|
||||||
name={name}
|
name={name}
|
||||||
isSortable={isSortable}
|
isSortable={isSortable}
|
||||||
{...otherProps}
|
{...otherProps}
|
||||||
|
@ -102,6 +106,7 @@ class SeriesIndexHeader extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
SeriesIndexHeader.propTypes = {
|
SeriesIndexHeader.propTypes = {
|
||||||
|
showBanners: PropTypes.bool.isRequired,
|
||||||
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
onTableOptionChange: PropTypes.func.isRequired
|
onTableOptionChange: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
|
@ -95,6 +95,7 @@ class SeriesIndexTable extends Component {
|
||||||
rowRenderer={this.rowRenderer}
|
rowRenderer={this.rowRenderer}
|
||||||
header={
|
header={
|
||||||
<SeriesIndexHeaderConnector
|
<SeriesIndexHeaderConnector
|
||||||
|
showBanners={showBanners}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
sortKey={sortKey}
|
sortKey={sortKey}
|
||||||
sortDirection={sortDirection}
|
sortDirection={sortDirection}
|
||||||
|
|
Loading…
Reference in New Issue