respond to review
parent
e81eb752cb
commit
c97f7fd81a
|
@ -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) => {
|
||||||
|
|
Loading…
Reference in New Issue