Fixed searchable select.
This commit is contained in:
parent
11400f4dd8
commit
ac1dcecff3
1 changed files with 30 additions and 2 deletions
|
@ -1,3 +1,31 @@
|
||||||
class App.UiElement.searchable_select
|
class App.UiElement.searchable_select extends App.UiElement.ApplicationUiElement
|
||||||
@render: (attribute) ->
|
@render: (attribute, params) ->
|
||||||
|
|
||||||
|
# set multiple option
|
||||||
|
if attribute.multiple
|
||||||
|
attribute.multiple = 'multiple'
|
||||||
|
else
|
||||||
|
attribute.multiple = ''
|
||||||
|
|
||||||
|
# build options list based on config
|
||||||
|
@getConfigOptionList( attribute, params )
|
||||||
|
|
||||||
|
# build options list based on relation
|
||||||
|
@getRelationOptionList( attribute, params )
|
||||||
|
|
||||||
|
# add null selection if needed
|
||||||
|
@addNullOption( attribute, params )
|
||||||
|
|
||||||
|
# sort attribute.options
|
||||||
|
@sortOptions( attribute, params )
|
||||||
|
|
||||||
|
# finde selected/checked item of list
|
||||||
|
@selectedOptions( attribute, params )
|
||||||
|
|
||||||
|
# disable item of list
|
||||||
|
@disabledOptions( attribute, params )
|
||||||
|
|
||||||
|
# filter attributes
|
||||||
|
@filterOption( attribute, params )
|
||||||
|
|
||||||
new App.SearchableSelect( attribute: attribute ).element()
|
new App.SearchableSelect( attribute: attribute ).element()
|
||||||
|
|
Loading…
Reference in a new issue