bito-code-review[bot] commented on code in PR #37777:
URL: https://github.com/apache/superset/pull/37777#discussion_r3488481237
##########
superset-frontend/src/explore/components/DataTablesPane/DataTablesPane.tsx:
##########
@@ -188,14 +188,17 @@ export const DataTablesPane = ({
queryForce,
ownState,
isRequest: isRequest.results,
- setForceQuery,
- isVisible: ResultTypes.Results === activeTabKey,
canDownload,
Review Comment:
<!-- Bito Reply -->
The suggestion to restore the `setForceQuery` prop is appropriate. Since the
`useResultsPane` hook depends on this prop to reset the force-query state after
a request resolves, re-adding it ensures the 'Run' button and query state
behave correctly after successful operations.
**superset-frontend/src/explore/components/DataTablesPane/DataTablesPane.tsx**
```
queryForce,
ownState,
isRequest: isRequest.results,
setForceQuery,
isVisible: ResultTypes.Results === activeTabKey,
canDownload,
```
##########
superset-frontend/src/explore/components/DataTablesPane/components/useResultsPane.tsx:
##########
@@ -181,7 +181,7 @@ export const useResultsPane = ({
coltypes={result.coltypes}
rowcount={result.rowcount}
datasourceId={queryFormData.datasource}
- isVisible={isVisible}
+ isVisible={isVisible ?? true}
Review Comment:
<!-- Bito Reply -->
The suggestion to remove the optional marker from the interface is valid if
the prop is always provided or if the fallback logic is intended to be the
primary behavior. Since the parent component handles the visibility state and
ensures a mounted pane is visible, updating the interface to reflect this
contract improves type safety and clarifies the component's usage.
**superset-frontend/src/explore/components/DataTablesPane/components/useResultsPane.tsx**
```
datasourceId={queryFormData.datasource}
isVisible={isVisible ?? true}
```
--
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]