all files / s-select/components/ select-dropdown-option.js

100% Statements 3/3
100% Branches 0/0
100% Functions 2/2
100% Lines 3/3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26                                10×              
import Ember from 'ember';
import layout from '../templates/components/select-dropdown-option';
 
const {
  Component,
  computed
} = Ember;
 
export default Component.extend({
  layout,
  classNames: ['es-option'],
  classNameBindings: ['model.isSelected:es-highlight'],
  attributeBindings: ['hidden', 'model.name:title'],
 
  hidden: computed.not('model.isVisible'),
 
  click() {
    this.get('select')(this.get('model'));
  },
 
  mouseEnter() {
    this.get('hover')(this.get('model'));
  }
});