Skip to content

Commit

Permalink
[table editor] fix 'Autocomplete filters' checkbox doesn't stick
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Aug 25, 2018
1 parent 54ae215 commit ba32944
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion superset/assets/src/datasource/DatasourceEditor.jsx
Expand Up @@ -329,7 +329,7 @@ export class DatasourceEditor extends React.PureComponent {
control={<TextControl />}
/>
<Field
fieldKey="filter_select"
fieldKey="filter_select_enabled"
label={t('Autocomplete filters')}
descr={t('Whether to populate autocomplete filters options')}
control={<CheckboxControl />}
Expand Down
3 changes: 2 additions & 1 deletion superset/connectors/base/models.py
Expand Up @@ -188,7 +188,8 @@ def data(self):
'description': self.description,
'database': self.database.data, # pylint: disable=no-member
'default_endpoint': self.default_endpoint,
'filter_select': self.filter_select_enabled,
'filter_select': self.filter_select_enabled, # TODO deprecate
'filter_select_enabled': self.filter_select_enabled,
'name': self.name,
'datasource_name': self.datasource_name,
'type': self.type,
Expand Down
1 change: 1 addition & 0 deletions superset/connectors/druid/models.py
Expand Up @@ -488,6 +488,7 @@ class DruidDatasource(Model, BaseDatasource):
export_fields = (
'datasource_name', 'is_hidden', 'description', 'default_endpoint',
'cluster_name', 'offset', 'cache_timeout', 'params',
'filter_select_enabled',
)
update_from_object_fields = export_fields

Expand Down
2 changes: 1 addition & 1 deletion superset/connectors/sqla/models.py
Expand Up @@ -287,7 +287,7 @@ class SqlaTable(Model, BaseDatasource):
export_fields = (
'table_name', 'main_dttm_col', 'description', 'default_endpoint',
'database_id', 'offset', 'cache_timeout', 'schema',
'sql', 'params', 'template_params')
'sql', 'params', 'template_params', 'filter_select_enabled')
update_from_object_fields = [
f for f in export_fields if f not in ('table_name', 'database_id')]
export_parent = 'database'
Expand Down

0 comments on commit ba32944

Please sign in to comment.