mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
chore(explore): make adhoc columns available without UX BETA ff (#17921)
* chore(explore): make adhoc columns available without UX BETA ff * Remove redundant imports
This commit is contained in:
committed by
GitHub
parent
55cd7fb412
commit
6cad7b1d05
@@ -59,7 +59,6 @@ interface ColumnSelectPopoverProps {
|
||||
setLabel: (title: string) => void;
|
||||
getCurrentTab: (tab: string) => void;
|
||||
label: string;
|
||||
isAdhocColumnsEnabled: boolean;
|
||||
}
|
||||
|
||||
const getInitialColumnValues = (
|
||||
@@ -85,7 +84,6 @@ const ColumnSelectPopover = ({
|
||||
setLabel,
|
||||
getCurrentTab,
|
||||
label,
|
||||
isAdhocColumnsEnabled,
|
||||
}: ColumnSelectPopoverProps) => {
|
||||
const [initialLabel] = useState(label);
|
||||
const [initialAdhocColumn, initialCalculatedColumn, initialSimpleColumn] =
|
||||
@@ -279,28 +277,27 @@ const ColumnSelectPopover = ({
|
||||
/>
|
||||
</FormItem>
|
||||
</Tabs.TabPane>
|
||||
{isAdhocColumnsEnabled && (
|
||||
<Tabs.TabPane key="sqlExpression" tab={t('Custom SQL')}>
|
||||
<SQLEditor
|
||||
value={
|
||||
adhocColumn?.sqlExpression ||
|
||||
selectedSimpleColumn?.column_name ||
|
||||
selectedCalculatedColumn?.expression
|
||||
}
|
||||
onFocus={onSqlEditorFocus}
|
||||
showLoadingForImport
|
||||
onChange={onSqlExpressionChange}
|
||||
width="100%"
|
||||
height={`${POPOVER_INITIAL_HEIGHT - 80}px`}
|
||||
showGutter={false}
|
||||
editorProps={{ $blockScrolling: true }}
|
||||
enableLiveAutocompletion
|
||||
className="filter-sql-editor"
|
||||
wrapEnabled
|
||||
ref={sqlEditorRef}
|
||||
/>
|
||||
</Tabs.TabPane>
|
||||
)}
|
||||
|
||||
<Tabs.TabPane key="sqlExpression" tab={t('Custom SQL')}>
|
||||
<SQLEditor
|
||||
value={
|
||||
adhocColumn?.sqlExpression ||
|
||||
selectedSimpleColumn?.column_name ||
|
||||
selectedCalculatedColumn?.expression
|
||||
}
|
||||
onFocus={onSqlEditorFocus}
|
||||
showLoadingForImport
|
||||
onChange={onSqlExpressionChange}
|
||||
width="100%"
|
||||
height={`${POPOVER_INITIAL_HEIGHT - 80}px`}
|
||||
showGutter={false}
|
||||
editorProps={{ $blockScrolling: true }}
|
||||
enableLiveAutocompletion
|
||||
className="filter-sql-editor"
|
||||
wrapEnabled
|
||||
ref={sqlEditorRef}
|
||||
/>
|
||||
</Tabs.TabPane>
|
||||
</Tabs>
|
||||
<div>
|
||||
<Button buttonSize="small" onClick={onResetStateAndClose} cta>
|
||||
|
||||
Reference in New Issue
Block a user