From 3cc1fc41820e63b48f13e684f41b6ace5d7005c6 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 5 May 2015 12:56:22 +0200 Subject: [PATCH] Populate current attributes of item in filter(). --- .../app/controllers/_application_controller_form.js.coffee | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee b/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee index f03e69a16..60e4ffe35 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee @@ -2142,8 +2142,7 @@ class App.ControllerForm extends App.Controller return if !App[attribute.relation] attribute.options = [] - - list = [] + list = [] if attribute.filter App.Log.debug 'ControllerForm', '_getRelationOptionList:filter', attribute.filter @@ -2154,7 +2153,7 @@ class App.ControllerForm extends App.Controller all = App[ attribute.relation ].search( sortBy: attribute.sortBy ) - list = attribute.filter( all, 'collection' ) + list = attribute.filter( all, 'collection', @params ) # data based filter else if attribute.filter[ attribute.name ]