FIX: ensures filteredContent is recomputed when sortBy changes (#30)
This commit is contained in:
parent
7de1e5a68e
commit
0d655221f4
|
@ -27,7 +27,7 @@ export default Ember.Controller.extend({
|
||||||
sortBy: ["last_run_at:desc"],
|
sortBy: ["last_run_at:desc"],
|
||||||
sortedQueries: Em.computed.sort("model", "sortBy"),
|
sortedQueries: Em.computed.sort("model", "sortBy"),
|
||||||
|
|
||||||
@computed("search")
|
@computed("search", "sortBy")
|
||||||
filteredContent(search) {
|
filteredContent(search) {
|
||||||
const regexp = new RegExp(this.get("search"), "i");
|
const regexp = new RegExp(this.get("search"), "i");
|
||||||
return this.get("sortedQueries").filter(function(result) {
|
return this.get("sortedQueries").filter(function(result) {
|
||||||
|
|
Loading…
Reference in New Issue