fix(ui): dont send try when metric exists and not edited
This commit is contained in:
parent
da31fd8a19
commit
16dc0c17c7
2 changed files with 3 additions and 2 deletions
|
|
@ -13,6 +13,7 @@ import { CLICKMAP, TABLE, TIMESERIES } from "App/constants/card";
|
|||
interface Props {
|
||||
className?: string;
|
||||
name: string;
|
||||
isEditing?: boolean;
|
||||
}
|
||||
function WidgetPreview(props: Props) {
|
||||
const [showDashboardSelectionModal, setShowDashboardSelectionModal] = React.useState(false);
|
||||
|
|
@ -94,7 +95,7 @@ function WidgetPreview(props: Props) {
|
|||
</div>
|
||||
</div>
|
||||
<div className="p-4 pt-0">
|
||||
<WidgetWrapper widget={metric} isPreview={true} isWidget={false} hideName />
|
||||
<WidgetWrapper widget={metric} isPreview={true} isWidget={!props.isEditing} hideName />
|
||||
</div>
|
||||
</div>
|
||||
{ canAddToDashboard && (
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ function WidgetView(props: Props) {
|
|||
{expanded && <WidgetForm onDelete={onBackHandler} {...props} />}
|
||||
</div>
|
||||
|
||||
<WidgetPreview className="mt-8" name={widget.name} />
|
||||
<WidgetPreview className="mt-8" name={widget.name} isEditing={expanded} />
|
||||
|
||||
{widget.metricOf !== FilterKey.SESSIONS && widget.metricOf !== FilterKey.ERRORS && (
|
||||
<>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue