michael-s-molina commented on code in PR #28652: URL: https://github.com/apache/superset/pull/28652#discussion_r1612241948
########## superset-frontend/src/explore/components/ExploreViewContainer/index.jsx: ########## @@ -460,15 +460,21 @@ function ExploreViewContainer(props) { const chartIsStale = useMemo(() => { if (lastQueriedControls) { - const changedControlKeys = Object.keys(props.controls).filter( - key => - typeof lastQueriedControls[key] !== 'undefined' && - !areObjectsEqual( - props.controls[key].value, - lastQueriedControls[key].value, - { ignoreFields: ['datasourceWarning'] }, - ), - ); + const { controls } = props; + const changedControlKeys = Object.keys(controls).filter(key => { Review Comment: This change fixes a problem with the algorithm that detect a stale chart. Previously, if the values being compared were not objects, we had wrong results. For example, if a user changed the row limit, which is a number, the banner indicating a staled chart was not shown. This should significantly improve user experience when changing control values. ########## superset-frontend/src/explore/components/ExploreViewContainer/index.jsx: ########## @@ -460,15 +460,21 @@ function ExploreViewContainer(props) { const chartIsStale = useMemo(() => { if (lastQueriedControls) { - const changedControlKeys = Object.keys(props.controls).filter( - key => - typeof lastQueriedControls[key] !== 'undefined' && - !areObjectsEqual( - props.controls[key].value, - lastQueriedControls[key].value, - { ignoreFields: ['datasourceWarning'] }, - ), - ); + const { controls } = props; + const changedControlKeys = Object.keys(controls).filter(key => { Review Comment: This change fixes a problem with the algorithm that detects a stale chart. Previously, if the values being compared were not objects, we had wrong results. For example, if a user changed the row limit, which is a number, the banner indicating a staled chart was not shown. This should significantly improve user experience when changing control values. -- 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. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org