Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
fix search bar disappearing
Browse files Browse the repository at this point in the history
  • Loading branch information
hahmadia committed May 15, 2020
1 parent 7116e5a commit 114cd70
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ export default class AbstractList extends React.PureComponent {
getData: PropTypes.func.isRequired,
removeGroup: PropTypes.func,
}).isRequired,
hideHeader: PropTypes.bool,
};

static defaultProps = {
data: [],
hideHeader: true,
};

constructor(props) {
Expand Down Expand Up @@ -56,7 +58,7 @@ export default class AbstractList extends React.PureComponent {
}

renderHeader = () => {
if (this.props.data.length > 0) {
if (this.props.data.length > 0 || !this.props.hideHeader) {
return this.props.header;
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ export default class ChannelList extends React.PureComponent<ChannelListProps, C
}
return (
<AbstractList
hideHeader={false}
header={this.header()}
renderRow={this.renderRow}
{...absProps}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export default class TeamList extends React.PureComponent {
return (
<AbstractList
header={this.header()}
hideHeader={false}
renderRow={this.renderRow}
{...absProps}
key={this.state.pageResetKey}
Expand Down

0 comments on commit 114cd70

Please sign in to comment.