Shows all autocomplete values on click instead of having to type initially

This commit is contained in:
Jayant Jain 2014-07-29 01:45:59 +05:30
parent 0555c2ec14
commit 632d9a666e

View file

@ -128,8 +128,9 @@ class EventPropsNode extends TreemaNode.nodeMap.string
super(valEl)
channel = @getRoot().data.channel
channelSchema = Backbone.Mediator.channelSchemas[channel]
autocompleteValues = ({label: val?.title or key, value: key} for key, val of channelSchema?.properties)
valEl.find('input').autocomplete(source: autocompleteValues, minLength: 0, delay: 0, autoFocus: true)
autocompleteValues = []
autocompleteValues.push key for key, val of channelSchema?.properties
valEl.find('input').autocomplete(source: autocompleteValues, minLength: 0, delay: 0, autoFocus: true).autocomplete("search", "")
valEl
saveChanges: (valEl) ->