Added current value to selection.
This commit is contained in:
parent
9997513671
commit
3ccff4401e
1 changed files with 10 additions and 0 deletions
|
@ -1595,6 +1595,16 @@ class App.ControllerForm extends App.Controller
|
|||
if record['id'] is key || ( record['id'] && key && record['id'].toString() is key.toString() )
|
||||
list.push record
|
||||
|
||||
# check if current value need to be added
|
||||
if @params[ attribute.name ]
|
||||
hit = false
|
||||
for value in list
|
||||
if value['id'].toString() is @params[ attribute.name ].toString()
|
||||
hit = true
|
||||
if !hit
|
||||
currentRecord = App[ attribute.relation ].find( @params[ attribute.name ] )
|
||||
list.push currentRecord
|
||||
|
||||
# no data filter matched
|
||||
else
|
||||
App.Log.debug 'ControllerForm', '_getRelationOptionList:filter-data no filter matched'
|
||||
|
|
Loading…
Reference in a new issue