unepwcmc/SAPI

View on GitHub
app/assets/javascripts/species/views/search_form/taxon_concept_search_suggestion_component.js.coffee

Summary

Maintainability
Test Coverage
Species.TaxonConceptSearchSuggestionComponent = Ember.Component.extend({
  layoutName: 'species/components/taxon-concept-search-suggestion'
  tagName: 'li'
  targetObject: Em.computed.alias('parentView')
  autoCompleteTaxonConcept: ( ->
    Species.AutoCompleteTaxonConcept.find(@get('taxonConceptId'))
  ).property('taxonConceptId')

  click: () ->
    @sendAction('action', @get('autoCompleteTaxonConcept'))
    false # don't bubble
});