aaronucsd commented on a change in pull request #3715: Email share
URL: https://github.com/apache/incubator-pinot/pull/3715#discussion_r251546789
 
 

 ##########
 File path: 
thirdeye/thirdeye-frontend/app/pods/home/share-dashboard/controller.js
 ##########
 @@ -409,58 +342,56 @@ export default Controller.extend({
     const customizeEmail1 = document.getElementById('customizeEmail1').value;
     const customizeEmail2 = document.getElementById('customizeEmail2').value;
 
-    const sibingValue = type === 'one' ? customizeEmail2 : customizeEmail1;
-    this.toggleProperty(`show${sibingValue}`);
+    const siblingValue = type === 'one' ? customizeEmail2 : customizeEmail1;
+    this._toggleTreeProperty(`show${siblingValue}`);
 
     //Calculates colspan Number
     const showCustomizeEmailTemplate = get(this, 'showCustomizeEmailTemplate');
     if(showCustomizeEmailTemplate && (customizeEmail1 === 'Nothing' || 
customizeEmail2 === 'Nothing')) {
-      set(this, 'colspanNum', 5);
+      set(this, 'tree.firstObject.colspanNum', 5);
     } else if (showCustomizeEmailTemplate) {
-      set(this, 'colspanNum', 6);
+      set(this, 'tree.firstObject.colspanNum', 6);
     } else {
-      set(this, 'colspanNum', 4);
+      set(this, 'tree.firstObject.colspanNum', 4);
     }
 
+    let limitedSelfOptions = this._selectOption([ ...CUSTOMIZE_OPTIONS], 
option);
+    let limitedSiblingOptions = this._selectOption([ ...CUSTOMIZE_OPTIONS], 
siblingValue);
+
     //limited sibling list to selected choice
-    const limitedSiblingOptions = CUSTOMIZE_OPTIONS.filter(function(item){
+    limitedSiblingOptions = limitedSiblingOptions.filter(function(item){
       return item.value !== option;
     });
     //limited current list to sibling's existing selected
-    const limitedSelfOptions = CUSTOMIZE_OPTIONS.filter(function(item){
-      return item.value !== sibingValue;
+    limitedSelfOptions = limitedSelfOptions.filter(function(item){
+      return item.value !== siblingValue;
     });
 
-    if (type === 'one') {
-      set(this, 'options_two', limitedSiblingOptions);
-      set(this, 'options', limitedSelfOptions);
-    } else {
-      set(this, 'options', limitedSiblingOptions);
-      set(this, 'options_two', limitedSelfOptions);
-    }
-
-    // fetch base on offset
-    if (option !== 'Nothing') {
-      this._getOffsets();
-    }
-
     switch(option) {
       case 'Nothing':
         //hide accordingly
         break;
       case 'Wow':
         //show wow column and it's sibling
-        this.toggleProperty('showWow');
+        this._toggleTreeProperty('showWow');
 
 Review comment:
   Is there a reason why we creating our own custom toggling for property vs 
using the built in one by ember?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to