kgabryje commented on a change in pull request #11012:
URL: 
https://github.com/apache/incubator-superset/pull/11012#discussion_r494917912



##########
File path: superset-frontend/src/components/AlteredSliceTag.jsx
##########
@@ -65,7 +65,18 @@ export default class AlteredSliceTag extends React.Component 
{
       return;
     }
     const diffs = this.getDiffs(newProps);
-    this.setState({ diffs, hasDiffs: !isEmpty(diffs) });
+    this.setState(prevState => ({
+      rows: this.getRowsFromDiffs(diffs, prevState.controlsMap),
+      hasDiffs: !isEmpty(diffs),
+    }));
+  }
+
+  getRowsFromDiffs(diffs, controlsMap = this.state.controlsMap) {

Review comment:
       I agree, that test made little sense. I changed the logic so that we spy 
on `getRowsFromDiffs`  to check if it was called and if `state.rows` equals a 
mocked return value from `getRowsFromDiffs`.
   Is that what you meant?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to