Skip to content

Commit

Permalink
Add documentation for the actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robdel12 committed Sep 1, 2016
1 parent 889f76c commit c998182
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions addon/components/x-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,28 @@ export default Ember.Component.extend({
})),

actions: {

/**
* Registers a new option that is contained within x-select.
*
* This is called whenever an x-option component is inserted into the DOM.
*
* @param {<x-option>} option - x-option component.
* @private
*/
registerOption(option) {
this.get('options').push(option);
this._setDefaultValues();
},

/**
* Removes a the passed option that is contained within x-select.
*
* This is called whenever an x-option component is begining teardown.
*
* @param {<x-option>} option - x-option component.
* @private
*/
unregisterOption(option) {
this.get('options').removeObject(option);
this._setDefaultValues();
Expand Down

0 comments on commit c998182

Please sign in to comment.