madhushreeag commented on code in PR #37555:
URL: https://github.com/apache/superset/pull/37555#discussion_r2843371040
##########
superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.tsx:
##########
@@ -2372,12 +2419,29 @@ class DatasourceEditor extends PureComponent<
),
children: (
<StyledTableTabWrapper>
- {this.renderDefaultColumnSettings()}
- <DefaultColumnSettingsTitle>
- {t('Column Settings')}
- </DefaultColumnSettingsTitle>
+ <Input.Search
+ placeholder={t('Search calculated columns by name')}
+ value={this.state.calculatedColumnSearchTerm}
+ onChange={e =>
+ this.setState({
+ calculatedColumnSearchTerm: e.target.value,
+ })
+ }
+ style={{ marginBottom: 16, width: 300 }}
+ allowClear
+ />
<ColumnCollectionTable
- columns={this.state.calculatedColumns}
+ columns={
+ this.state.calculatedColumnSearchTerm
+ ? this.state.calculatedColumns.filter(col =>
+ col.column_name
+ ?.toLowerCase()
Review Comment:
fixed - String(item[field] ?? '') coerces null/undefined to an empty string
before calling .toLowerCase().includes(), so there's no risk of a TypeError on
null/undefined column_name 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: [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]