Browse Source

Fixed bug: Options of searchable_-/multi-/select field get sorted even if disabled via configuration.

Thorsten Eckel 9 years ago
parent
commit
074e90d471

+ 3 - 0
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 )