mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
Merge pull request #5723 from mistercrunch/fix_autocomplete_filters
[table editor] fix 'Autocomplete filters' checkbox doesn't stick
This commit is contained in:
commit
19062ed50e
@ -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 />}
|
||||
|
@ -188,7 +188,8 @@ class BaseDatasource(AuditMixinNullable, ImportMixin):
|
||||
'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,
|
||||
|
@ -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
|
||||
|
||||
|
@ -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'
|
||||
|
2
tests/fixtures/datasource.py
vendored
2
tests/fixtures/datasource.py
vendored
@ -10,7 +10,7 @@ datasource_post = {
|
||||
'column_formats': {'ratio': '.2%'},
|
||||
'description': 'Adding a DESCRip',
|
||||
'default_endpoint': '',
|
||||
'filter_select': True,
|
||||
'filter_select_enabled': True,
|
||||
'name': 'birth_names',
|
||||
'datasource_name': 'birth_names',
|
||||
'type': 'table',
|
||||
|
Loading…
Reference in New Issue
Block a user