You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/10/26 17:30:34 UTC

[GitHub] [incubator-superset] ktmud commented on a change in pull request #11412: fix: multiple issues with FilterPopover

ktmud commented on a change in pull request #11412:
URL: https://github.com/apache/incubator-superset/pull/11412#discussion_r512142949



##########
File path: superset-frontend/src/explore/components/AdhocFilterOption.jsx
##########
@@ -60,7 +60,6 @@ class AdhocFilterOption extends React.PureComponent {
     // isNew is used to indicate whether to automatically open the overlay
     // once the overlay has been opened, the metric/filter will never be
     // considered new again.
-    this.props.adhocFilter.isNew = false;

Review comment:
       Mutating the prop of the object passed to the component was the simplest and most efficient way to update the select option state without forcing rerenders, and it's probably not as bad as it seems because we know no other places depend on this prop.
   
   If you want to eliminate the need of mutating a prop, you should propagate the updated `adhocFilter` back to the select options by triggering the `onChange` event on `AdhocFilterControl` (which could have its own problem because of rerenders).




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org