mirror of
https://github.com/apache/superset.git
synced 2024-09-16 02:29:39 -04:00
parent
c832542570
commit
f9567efe81
@ -23,7 +23,7 @@ import { FormGroup } from 'react-bootstrap';
|
|||||||
import Tabs from 'src/components/Tabs';
|
import Tabs from 'src/components/Tabs';
|
||||||
import Button from 'src/components/Button';
|
import Button from 'src/components/Button';
|
||||||
import { NativeSelect as Select } from 'src/components/Select';
|
import { NativeSelect as Select } from 'src/components/Select';
|
||||||
import { t } from '@superset-ui/core';
|
import { t, styled } from '@superset-ui/core';
|
||||||
|
|
||||||
import FormLabel from 'src/components/FormLabel';
|
import FormLabel from 'src/components/FormLabel';
|
||||||
import { SQLEditor } from 'src/components/AsyncAceEditor';
|
import { SQLEditor } from 'src/components/AsyncAceEditor';
|
||||||
@ -59,6 +59,18 @@ const defaultProps = {
|
|||||||
getCurrentTab: noOp,
|
getCurrentTab: noOp,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const StyledSelect = styled(Select)`
|
||||||
|
.metric-option {
|
||||||
|
& > svg {
|
||||||
|
min-width: ${({ theme }) => `${theme.gridUnit * 4}px`};
|
||||||
|
}
|
||||||
|
& > .option-label {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
export const SAVED_TAB_KEY = 'SAVED';
|
export const SAVED_TAB_KEY = 'SAVED';
|
||||||
|
|
||||||
const startingWidth = 320;
|
const startingWidth = 320;
|
||||||
@ -344,7 +356,7 @@ export default class AdhocMetricEditPopover extends React.PureComponent {
|
|||||||
<FormLabel>
|
<FormLabel>
|
||||||
<strong>{t('Saved metric')}</strong>
|
<strong>{t('Saved metric')}</strong>
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<Select
|
<StyledSelect
|
||||||
{...savedSelectProps}
|
{...savedSelectProps}
|
||||||
name="select-saved"
|
name="select-saved"
|
||||||
getPopupContainer={triggerNode => triggerNode.parentNode}
|
getPopupContainer={triggerNode => triggerNode.parentNode}
|
||||||
@ -361,7 +373,7 @@ export default class AdhocMetricEditPopover extends React.PureComponent {
|
|||||||
<StyledMetricOption metric={savedMetric} showType />
|
<StyledMetricOption metric={savedMetric} showType />
|
||||||
</Select.Option>
|
</Select.Option>
|
||||||
))}
|
))}
|
||||||
</Select>
|
</StyledSelect>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
<Tabs.TabPane key={EXPRESSION_TYPES.SIMPLE} tab={t('Simple')}>
|
<Tabs.TabPane key={EXPRESSION_TYPES.SIMPLE} tab={t('Simple')}>
|
||||||
|
Loading…
Reference in New Issue
Block a user