diff --git a/app/client/src/layoutSystems/autolayout/editor/AutoLayoutEditorWidgetOnion.tsx b/app/client/src/layoutSystems/autolayout/editor/AutoLayoutEditorWidgetOnion.tsx index 940ad0e19e..edd63d2db3 100644 --- a/app/client/src/layoutSystems/autolayout/editor/AutoLayoutEditorWidgetOnion.tsx +++ b/app/client/src/layoutSystems/autolayout/editor/AutoLayoutEditorWidgetOnion.tsx @@ -41,7 +41,16 @@ export const AutoLayoutEditorWidgetOnion = (props: BaseWidgetProps) => { } = props; const generateDragState = useCallback( (e: React.DragEvent, draggableRef: HTMLElement) => { - return generateDragStateForFixedLayout(e, draggableRef, props); + return generateDragStateForFixedLayout(e, draggableRef, { + bottomRow, + topRow, + leftColumn, + rightColumn, + parentColumnSpace, + parentRowSpace, + parentId, + widgetId, + }); }, [ bottomRow, diff --git a/app/client/src/layoutSystems/fixedlayout/common/utils.ts b/app/client/src/layoutSystems/fixedlayout/common/utils.ts index 40846d8c70..e3590d01ae 100644 --- a/app/client/src/layoutSystems/fixedlayout/common/utils.ts +++ b/app/client/src/layoutSystems/fixedlayout/common/utils.ts @@ -13,7 +13,7 @@ export const generateDragStateForFixedLayout = ( rightColumn, topRow, widgetId, - }: BaseWidgetProps, + }: Omit, ): SetDraggingStateActionPayload => { const widgetHeight = bottomRow - topRow; const widgetWidth = rightColumn - leftColumn; diff --git a/app/client/src/sagas/WidgetAdditionSagas.ts b/app/client/src/sagas/WidgetAdditionSagas.ts index e79c5c9760..0c5cc07a5d 100644 --- a/app/client/src/sagas/WidgetAdditionSagas.ts +++ b/app/client/src/sagas/WidgetAdditionSagas.ts @@ -186,6 +186,26 @@ function* getChildWidgetProps( } widget.widgetId = newWidgetId; + // Remove props that don't belong in the DSL and can be accessed using + // the widget type's static methods and configurations + // Fixes #21825 + widget.rows = undefined; + widget.columns = undefined; + widget.name = undefined; + widget.iconSVG = undefined; + widget.thumbnailSVG = undefined; + widget.hideCard = undefined; + widget.isDeprecated = undefined; + widget.needsMeta = undefined; + widget.searchTags = undefined; + widget.tags = undefined; + widget.displayName = undefined; + widget.onCanvasUI = undefined; + widget.eagerRender = undefined; + widget.needsHeightForContent = undefined; + widget.features = undefined; + widget.replacement = undefined; + /** * un-evaluated childStylesheet used by widgets; so they are to be excluded * from the dynamicBindingPathList and they are not included as a part of