mirror of
https://github.com/apache/superset.git
synced 2026-06-01 21:59:26 +00:00
feat: When editing the label/title in the Metrics popover, hitting Enter should save what you've typed (#19898)
* feature: When editing the label/title in the Metrics popover, hitting Enter should save what you've typed * Apply emotion templating to input/input labels
This commit is contained in:
@@ -17,10 +17,16 @@
|
||||
* under the License.
|
||||
*/
|
||||
import React, { useCallback, useState } from 'react';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { t, styled } from '@superset-ui/core';
|
||||
import { Input } from 'src/components/Input';
|
||||
import { Tooltip } from 'src/components/Tooltip';
|
||||
|
||||
const StyledInput = styled(Input)`
|
||||
border-radius: ${({ theme }) => theme.borderRadius};
|
||||
height: 26px;
|
||||
padding-left: ${({ theme }) => theme.gridUnit * 2.5}px;
|
||||
`;
|
||||
|
||||
export const DndColumnSelectPopoverTitle = ({
|
||||
title,
|
||||
onChange,
|
||||
@@ -63,8 +69,7 @@ export const DndColumnSelectPopoverTitle = ({
|
||||
}
|
||||
|
||||
return isEditMode ? (
|
||||
<Input
|
||||
className="metric-edit-popover-label-input"
|
||||
<StyledInput
|
||||
type="text"
|
||||
placeholder={title}
|
||||
value={hasCustomLabel ? title : ''}
|
||||
|
||||
Reference in New Issue
Block a user