rebenitez1802 commented on code in PR #33443:
URL: https://github.com/apache/superset/pull/33443#discussion_r2107455470
##########
superset-frontend/src/components/Datasource/DatasourceEditor.jsx:
##########
@@ -1097,35 +1144,63 @@ class DatasourceEditor extends PureComponent {
description={t(
'When specifying SQL, the datasource acts as a view. ' +
'Superset will use this statement as a subquery while
grouping and filtering ' +
- 'on the generated parent queries.',
+ 'on the generated parent queries.' +
+ 'If changes are made to your SQL query, ' +
+ 'columns in your dataset will be synced when saving
the dataset.',
)}
control={
- <TextAreaControl
- language="sql"
- offerEditInModal={false}
- minLines={10}
- maxLines={Infinity}
- readOnly={!this.state.isEditMode}
- resize="both"
- tooltipOptions={sqlTooltipOptions}
- />
+ this.props.isQueryRunning ? (
+ <>
+ {this.renderSqlEditotOverlay()}
+ <TextAreaControl
+ language="sql"
+ offerEditInModal={false}
+ minLines={10}
+ maxLines={Infinity}
+ readOnly={!this.state.isEditMode}
+ resize="both"
+ />
+ </>
+ ) : (
+ <TextAreaControl
+ language="sql"
+ offerEditInModal={false}
+ minLines={10}
+ maxLines={Infinity}
+ readOnly={!this.state.isEditMode}
+ resize="both"
+ />
+ )
Review Comment:
because this is react node is passed as a control prop to field component to
be able to show the value textArea needs to not be nested when not loading.
--
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]