Table fixes

- Fixed sorting and filtering on non-string columns
- Fixed warnings about missing required prop and invalid default value in table rows
- Fixed error occuring when formatting non-existent column
This commit is contained in:
Andrew Henry 2018-09-25 10:04:00 -07:00
parent 7483e886f1
commit c7b73bdc3f
3 changed files with 10 additions and 7 deletions

View File

@ -48,7 +48,12 @@ define(function () {
}
getFormattedValue(telemetryDatum) {
return this.formatter.format(telemetryDatum);
let formattedValue = this.formatter.format(telemetryDatum);
if (typeof formattedValue !== 'string') {
return formattedValue.toString();
} else {
return formattedValue;
}
}
};

View File

@ -39,7 +39,7 @@ define([], function () {
getFormattedValue(key) {
let column = this.columns[key];
return column.getFormattedValue(this.datum[key]);
return column && column.getFormattedValue(this.datum[key]);
}
getRowLimitClass() {

View File

@ -32,7 +32,9 @@ export default {
columnWidths: {
type: Array,
required: false,
default: [],
default() {
return [];
},
},
rowIndex: {
type: Number,
@ -48,10 +50,6 @@ export default {
type: Number,
required: false,
default: 0
},
configuration: {
type: Object,
required: true
}
},
methods: {