From 074e90d4712f45126c3f86dc0e83177818155a31 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Fri, 31 Jul 2015 11:03:56 +0200 Subject: [PATCH] Fixed bug: Options of searchable_-/multi-/select field get sorted even if disabled via configuration. --- .../app/controllers/_application_controller_form.js.coffee | 3 +++ 1 file changed, 3 insertions(+) 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 ba0bd079d..66e3b2c00 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee @@ -2093,6 +2093,9 @@ class App.ControllerForm extends App.Controller # sort attribute.options _sortOptions: (attribute) -> + # skip sorting if it is disabled by config + return if attribute.sortBy == null + return if !attribute.options if _.isArray( attribute.options )