jayeshchoudhary commented on code in PR #14736: URL: https://github.com/apache/pinot/pull/14736#discussion_r1902236500
########## pinot-controller/src/main/resources/app/pages/TenantDetails.tsx: ########## @@ -152,6 +152,18 @@ const TenantPageDetails = ({ match }: RouteComponentProps<Props>) => { const [showRebalanceServerModal, setShowRebalanceServerModal] = useState(false); const [schemaJSONFormat, setSchemaJSONFormat] = useState(false); + // This is quite hacky, but it's the only way to get this to work with the dialog. + // The useState variables are simply for the dialog box to know what to render in + // the checkbox fields. The actual state of the checkboxes is stored in the refs. + // The refs are then used to determine how we delete the table. If you try to use + // the state variables in this class, you will not be able to get their latest values. + const [dialogCheckboxes, setDialogCheckboxes] = useState({ + deleteImmediately: false, + deleteSchema: false + }); + const deleteImmediatelyRef = useRef(false); + const deleteSchemaRef = useRef(false); + Review Comment: got it, thanks for the info. Let me try debugging. Will update you here in a day or two. if not this solution looks good enough. -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org