mirror of
https://github.com/apache/superset.git
synced 2026-04-22 01:24:43 +00:00
feat: add support for filters in sqlLab (#14765)
This commit is contained in:
@@ -271,9 +271,22 @@ export default class ResultSet extends React.PureComponent<
|
||||
return;
|
||||
}
|
||||
|
||||
const { schema, sql, dbId, templateParams } = this.props.query;
|
||||
const { schema, sql, dbId } = this.props.query;
|
||||
let { templateParams } = this.props.query;
|
||||
const selectedColumns = this.props.query?.results?.selected_columns || [];
|
||||
|
||||
// The filters param is only used to test jinja templates.
|
||||
// Remove the special filters entry from the templateParams
|
||||
// before saving the dataset.
|
||||
if (templateParams) {
|
||||
const p = JSON.parse(templateParams);
|
||||
if (p.filters) {
|
||||
/* eslint-disable-next-line no-underscore-dangle */
|
||||
delete p._filters;
|
||||
templateParams = JSON.stringify(p);
|
||||
}
|
||||
}
|
||||
|
||||
this.props.actions
|
||||
.createDatasource({
|
||||
schema,
|
||||
|
||||
Reference in New Issue
Block a user