Skip to content

Commit

Permalink
Merge pull request #3666 from illacloud/beta
Browse files Browse the repository at this point in the history
fix: 🐛 columnSetter error
  • Loading branch information
AruSeito authored Feb 1, 2024
2 parents f8814ae + 06a2df5 commit b91ad17
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"private": true,
"author": "ILLA Cloud <[email protected]>",
"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",
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -112,13 +112,17 @@ const ColumnSetter: FC<ColumnSetterProps> = (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 (
<ColumnContainer
Expand Down

0 comments on commit b91ad17

Please sign in to comment.