mirror of
https://github.com/getredash/redash.git
synced 2025-12-19 09:27:23 -05:00
Merge pull request #1117 from getredash/feature/params_ui
Fix #1052: filter not working for date/time values
This commit is contained in:
@@ -174,9 +174,14 @@
|
||||
};
|
||||
|
||||
return (memo && _.some(filter.current, function(v) {
|
||||
// We compare with either the value or the String representation of the value,
|
||||
// because Select2 casts true/false to "true"/"false".
|
||||
return v == row[filter.name] || String(row[filter.name]) == v
|
||||
var value = row[filter.name];
|
||||
if (moment.isMoment(value)) {
|
||||
return value.isSame(v);
|
||||
} else {
|
||||
// We compare with either the value or the String representation of the value,
|
||||
// because Select2 casts true/false to "true"/"false".
|
||||
return (v == value || String(value) == v);
|
||||
}
|
||||
}));
|
||||
}, true);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user