respond to review

pull/3039/head
Iris Scholten 2018-03-23 13:44:54 -07:00
parent e81eb752cb
commit c97f7fd81a
1 changed files with 3 additions and 3 deletions

View File

@ -62,14 +62,14 @@ export class TableOptions extends PureComponent<Props, {}> {
get computedFieldNames() { get computedFieldNames() {
const {dataLabels} = this.props const {dataLabels} = this.props
return dataLabels.length return _.isEmpty(dataLabels)
? dataLabels.map(label => { ? [this.timeColumn]
: dataLabels.map(label => {
const existing = this.fieldNames.find(f => f.internalName === label) const existing = this.fieldNames.find(f => f.internalName === label)
return ( return (
existing || {internalName: label, displayName: '', visible: true} existing || {internalName: label, displayName: '', visible: true}
) )
}) })
: [this.timeColumn]
} }
public handleChooseSortBy = (option: Option) => { public handleChooseSortBy = (option: Option) => {