mirror of
https://github.com/getredash/redash.git
synced 2025-12-19 17:37:19 -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) {
|
return (memo && _.some(filter.current, function(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,
|
// We compare with either the value or the String representation of the value,
|
||||||
// because Select2 casts true/false to "true"/"false".
|
// because Select2 casts true/false to "true"/"false".
|
||||||
return v == row[filter.name] || String(row[filter.name]) == v
|
return (v == value || String(value) == v);
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
}, true);
|
}, true);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user