mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
Controls cleanup pass (#9578)
* migrating date_filter
* normalized control
* filter_configs control
* column_collection control
* time_range_endpoints control
* time_range_fixed control
* url_params control
* cache_timeout control
* annotation_layers control
* color control unused?
* linters rule 🤘
* this should have been deleted earlier
* global_opacity, mapbox_label, mapbox_style, viewport_zoom
* linting
* comparison_type
* contribution control
* log_scale
* show_values
* table_filter
* pandas_aggfunc
* code control
* formatSelectOptions import
* lint
* markup_type control
* lintage
* date_time_format control, linting
* url control, test mods
* min_periods control
* rolling_periods
* rolling_type
* missing lib
* order_desc
* number_format
* link_length
* all_columns_y
* all_columns_x
* normalize_across, select_country, all_columns
* fixing test
* linter-caught dependencies
* waiting
* wait longer!
* utilizing tabOverride for Analytics
* tabOverride for Annotations and Layers
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { getChartControlPanelRegistry } from '@superset-ui/chart';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import {
|
||||
@@ -23,6 +25,7 @@ import {
|
||||
getControlState,
|
||||
applyMapStateToPropsToControl,
|
||||
} from '../../../src/explore/controlUtils';
|
||||
import ColumnOption from '../../../src/components/ColumnOption';
|
||||
|
||||
describe('controlUtils', () => {
|
||||
const state = {
|
||||
@@ -92,6 +95,39 @@ describe('controlUtils', () => {
|
||||
label: t('My beautiful colors'),
|
||||
},
|
||||
},
|
||||
})
|
||||
.registerValue('table', {
|
||||
controlPanelSections: [
|
||||
{
|
||||
label: t('Chart Options'),
|
||||
expanded: true,
|
||||
controlSetRows: [
|
||||
[
|
||||
{
|
||||
name: 'all_columns',
|
||||
config: {
|
||||
type: 'SelectControl',
|
||||
multi: true,
|
||||
label: t('Columns'),
|
||||
default: [],
|
||||
description: t('Columns to display'),
|
||||
optionRenderer: c => <ColumnOption column={c} showType />,
|
||||
valueRenderer: c => <ColumnOption column={c} />,
|
||||
valueKey: 'column_name',
|
||||
allowAll: true,
|
||||
mapStateToProps: stateRef => ({
|
||||
options: stateRef.datasource
|
||||
? stateRef.datasource.columns
|
||||
: [],
|
||||
}),
|
||||
commaChoosesOption: false,
|
||||
freeForm: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user