Skip to content

Commit

Permalink
Merge pull request #394 from EverythingMe/feature/post_to_create_a_query
Browse files Browse the repository at this point in the history
Fix: column definitions weren't updated.
  • Loading branch information
arikfr committed Mar 19, 2015
2 parents 4b7561e + 086bbf1 commit c087289
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rd_ui/app/scripts/ng_smart_table.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@

//insert columns from column config
//TODO add a way to clean all columns
scope.$watch('columnCollection', function (oldValue, newValue) {
scope.$watchCollection('columnCollection', function (oldValue, newValue) {
if (scope.columnCollection) {
scope.columns.length = 0;
for (var i = 0, l = scope.columnCollection.length; i < l; i++) {
Expand Down
4 changes: 2 additions & 2 deletions rd_ui/app/scripts/visualizations/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@
};
} else if (columnType === 'date') {
columnDefinition.formatFunction = function (value) {
if (value) {
if (value && moment.isMoment(value)) {
return value.toDate().toLocaleDateString();
}
return value;
};
} else if (columnType === 'datetime') {
columnDefinition.formatFunction = function (value) {
if (value) {
if (value && moment.isMoment(value)) {
return value.toDate().toLocaleString();
}
return value;
Expand Down

0 comments on commit c087289

Please sign in to comment.