diegomedina248 commented on code in PR #19902:
URL: https://github.com/apache/superset/pull/19902#discussion_r863131013
##########
superset-frontend/src/explore/components/controls/ControlPopover/ControlPopover.tsx:
##########
@@ -89,24 +98,50 @@ const ControlPopover: React.FC<PopoverProps> = ({
const handleOnVisibleChange = useCallback(
(visible: boolean) => {
- if (props.visible === undefined) {
+ if (visible === undefined) {
Review Comment:
The local state is needed cause "visible" can be undefined, (leaving the
component uncontrolled), so we can't just call the `onVisibleChange` and expect
someone to update the state, the user might not be using this callback.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]