From c998182b78297cdb752bbc3131be0a77904932ab Mon Sep 17 00:00:00 2001 From: robdel12 Date: Wed, 31 Aug 2016 20:53:07 -0500 Subject: [PATCH] Add documentation for the actions. --- addon/components/x-select.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/addon/components/x-select.js b/addon/components/x-select.js index 30f0cf9..3938e80 100644 --- a/addon/components/x-select.js +++ b/addon/components/x-select.js @@ -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 {} 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 {} option - x-option component. + * @private + */ unregisterOption(option) { this.get('options').removeObject(option); this._setDefaultValues();