You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2021/05/08 03:51:35 UTC
[superset] branch fix-groupby-metric-type-icons updated: fix:
bringing metric type icon styles into SelectControl
This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a commit to branch fix-groupby-metric-type-icons
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/fix-groupby-metric-type-icons by this push:
new 0346d7b fix: bringing metric type icon styles into SelectControl
0346d7b is described below
commit 0346d7b0671827467a2746825ecf6ea719d8e8be
Author: Evan Rusackas <ev...@preset.io>
AuthorDate: Fri May 7 20:49:59 2021 -0700
fix: bringing metric type icon styles into SelectControl
---
.../src/explore/components/controls/SelectControl.jsx | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/superset-frontend/src/explore/components/controls/SelectControl.jsx b/superset-frontend/src/explore/components/controls/SelectControl.jsx
index 08b6e85..e310da2 100644
--- a/superset-frontend/src/explore/components/controls/SelectControl.jsx
+++ b/superset-frontend/src/explore/components/controls/SelectControl.jsx
@@ -18,7 +18,7 @@
*/
import React from 'react';
import PropTypes from 'prop-types';
-import { t } from '@superset-ui/core';
+import { t, css } from '@superset-ui/core';
import { Select, CreatableSelect, OnPasteSelect } from 'src/components/Select';
import ControlHeader from 'src/explore/components/ControlHeader';
@@ -294,7 +294,17 @@ export default class SelectControl extends React.PureComponent {
}
return (
- <div>
+ <div
+ css={theme => css`
+ .type-label {
+ margin-right: ${theme.gridUnit * 2}px;
+ width: ${theme.gridUnit * 7}px;
+ display: inline-block;
+ text-align: center;
+ font-weight: ${theme.typography.weights.bold};
+ }
+ `}
+ >
{this.props.showHeader && <ControlHeader {...this.props} />}
{isMulti ? (
<OnPasteSelect {...selectProps} selectWrap={SelectComponent} />