fix dashboard widget edit mode content (#18965)
This commit is contained in:
@@ -199,6 +199,7 @@ export const WidgetRenderer = ({ widget }: WidgetRendererProps) => {
|
||||
variant={variant}
|
||||
hasHeader={showHeader}
|
||||
isEditable={isWidgetEditable}
|
||||
hasInteractiveContent={widget.type === WidgetType.RECORD_TABLE}
|
||||
>
|
||||
{hasAccess ? (
|
||||
<ErrorBoundary
|
||||
|
||||
+3
-1
@@ -51,6 +51,7 @@ type WidgetCardContentProps = {
|
||||
variant: WidgetCardVariant;
|
||||
hasHeader: boolean;
|
||||
isEditable: boolean;
|
||||
hasInteractiveContent?: boolean;
|
||||
className?: string;
|
||||
children?: React.ReactNode;
|
||||
};
|
||||
@@ -59,11 +60,12 @@ export const WidgetCardContent = ({
|
||||
variant,
|
||||
hasHeader,
|
||||
isEditable,
|
||||
hasInteractiveContent = false,
|
||||
className,
|
||||
children,
|
||||
}: WidgetCardContentProps) => {
|
||||
const handleContentClick = (event: React.MouseEvent) => {
|
||||
if (!isEditable) {
|
||||
if (!isEditable || !hasInteractiveContent) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user