diff --git a/app/client/src/ce/constants/messages.ts b/app/client/src/ce/constants/messages.ts index 7967bb21fb..e5e35b8558 100644 --- a/app/client/src/ce/constants/messages.ts +++ b/app/client/src/ce/constants/messages.ts @@ -1627,6 +1627,8 @@ export const PROPERTY_PANE_EMPTY_SEARCH_RESULT_MESSAGE = "No properties found based on your search"; export const PROPERTY_SEARCH_INPUT_PLACEHOLDER = "Search for controls, labels etc"; +export const PROPERTY_PANE_TITLE_RENAME_DISABLED = () => + "This widget cannot be renamed"; export const EXPLORER_BETA_ENTITY = () => "BETA"; export const BINDING_WIDGET_WALKTHROUGH_TITLE = () => "Widget properties"; export const BINDING_WIDGET_WALKTHROUGH_DESC = () => diff --git a/app/client/src/pages/Editor/PropertyPane/PropertyPaneTitle.tsx b/app/client/src/pages/Editor/PropertyPane/PropertyPaneTitle.tsx index 21ee25646f..8b059c69f3 100644 --- a/app/client/src/pages/Editor/PropertyPane/PropertyPaneTitle.tsx +++ b/app/client/src/pages/Editor/PropertyPane/PropertyPaneTitle.tsx @@ -23,6 +23,10 @@ import { getIsCurrentWidgetRecentlyAdded, getPropertyPaneWidth, } from "selectors/propertyPaneSelectors"; +import { + createMessage, + PROPERTY_PANE_TITLE_RENAME_DISABLED, +} from "ee/constants/messages"; interface PropertyPaneTitleProps { title: string; @@ -31,6 +35,7 @@ interface PropertyPaneTitleProps { updatePropertyTitle?: (title: string) => void; onBackClick?: () => void; isPanelTitle?: boolean; + isRenameDisabled?: boolean; actions: Array<{ tooltipContent: string; icon: ReactElement; @@ -186,22 +191,36 @@ const PropertyPaneTitle = memo(function PropertyPaneTitle( className="flex-grow" onKeyDown={handleTabKeyDown} > - + {props.isRenameDisabled ? ( +
+ +
{name}
+
+
+ ) : ( + + )} {/* ACTIONS */} diff --git a/app/client/src/pages/Editor/PropertyPane/PropertyPaneView.tsx b/app/client/src/pages/Editor/PropertyPane/PropertyPaneView.tsx index c6143c68bb..f1663bc579 100644 --- a/app/client/src/pages/Editor/PropertyPane/PropertyPaneView.tsx +++ b/app/client/src/pages/Editor/PropertyPane/PropertyPaneView.tsx @@ -287,6 +287,7 @@ function PropertyPaneView( > [string], +) => config.type.startsWith("MODULE_WIDGET_"); + export const getWidgetCards = createSelector( getIsAutoLayout, getIsAnvilLayout, @@ -357,7 +361,7 @@ export const getWidgetCards = createSelector( return config.widgetName !== "Map" && !config.hideCard; } - return !config.hideCard; + return !config.hideCard && !isModuleWidget(config); }); const _cards: WidgetCardProps[] = cards.map((config) => {