diff --git a/apps/builder/package.json b/apps/builder/package.json index 13f1516013..db26476ac0 100644 --- a/apps/builder/package.json +++ b/apps/builder/package.json @@ -5,7 +5,7 @@ "private": true, "author": "ILLA Cloud ", "license": "Apache-2.0", - "version": "4.4.3", + "version": "4.4.4", "scripts": { "dev": "vite --strictPort --force", "build-cloud": "NODE_OPTIONS=--max-old-space-size=12288 vite build --mode cloud", diff --git a/apps/builder/src/page/App/components/InspectPanel/PanelSetters/DataGridSetter/ColumnSetter/index.tsx b/apps/builder/src/page/App/components/InspectPanel/PanelSetters/DataGridSetter/ColumnSetter/index.tsx index c0e7b92e88..7de49d688b 100644 --- a/apps/builder/src/page/App/components/InspectPanel/PanelSetters/DataGridSetter/ColumnSetter/index.tsx +++ b/apps/builder/src/page/App/components/InspectPanel/PanelSetters/DataGridSetter/ColumnSetter/index.tsx @@ -1,6 +1,6 @@ import { arrayMove } from "@dnd-kit/sortable" import { get, isEqual } from "lodash-es" -import { FC, useMemo } from "react" +import { FC, useEffect, useMemo } from "react" import { useSelector } from "react-redux" import { v4 } from "uuid" import { dealRawData2ArrayData } from "@/page/App/components/InspectPanel/PanelSetters/DataGridSetter/utils" @@ -112,13 +112,17 @@ const ColumnSetter: FC = (props) => { calculateColumns.forEach((config) => { mixedColumns.push(config) }) + + return mixedColumns + }, [calculateColumns, value]) + + useEffect(() => { if (!isEqual(mixedColumns, value)) { handleUpdateMultiAttrDSL?.({ [attrName]: mixedColumns, }) } - return mixedColumns - }, [attrName, calculateColumns, handleUpdateMultiAttrDSL, value]) + }, [attrName, handleUpdateMultiAttrDSL, mixedColumns, value]) return (