<commit_before>#= require jquery.ui.widget
#= require jquery.ui.autocomplete
#= require tag-it/js/tag-it

Pancakes.MultiSelect = Ember.TextField.extend
  showAutocompleteChoices: (->
    if @get('showChoicesCallback') && @get('candidates')
      cb = @get('showChoicesCallback')

      cb(@get('candidates').mapProperty 'display_text')
  ).observes('candidates.@each', 'showChoicesCallback')

  didInsertElement: ->
    @$().tagit
      autocomplete:
        source: (search, showChoices) =>
          @set 'showChoicesCallback', showChoices
          @set 'criterion', search.term
<commit_msg>Faster autocompletion.<commit_after>#= require jquery.ui.widget
#= require jquery.ui.autocomplete
#= require tag-it/js/tag-it

Pancakes.MultiSelect = Ember.TextField.extend
  showAutocompleteChoices: (->
    if @get('showChoicesCallback') && @get('candidates')
      cb = @get('showChoicesCallback')

      cb(@get('candidates').mapProperty 'display_text')
  ).observes('candidates.@each', 'showChoicesCallback')

  didInsertElement: ->
    @$().tagit
      autocomplete:
        delay: 0
        source: (search, showChoices) =>
          @set 'showChoicesCallback', showChoices
          @set 'criterion', search.term

{'fraction_non_alphanumeric': 0.14662273476112025, 'fraction_numerical': 0.0008237232289950577, 'mean_word_length': 3.802371541501976, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2487350', 'n_tokens_mistral': 413, 'n_tokens_neox': 377, 'n_words': 65}