Skip to content

Commit

Permalink
fix: 🐛 data grid can't search
Browse files Browse the repository at this point in the history
  • Loading branch information
AruSeito committed Nov 6, 2023
1 parent 00468d9 commit c2ca4ab
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 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": "3.3.3",
"version": "3.3.4",
"scripts": {
"dev": "vite --strictPort --force",
"build-cloud": "NODE_OPTIONS=--max-old-space-size=12288 vite build --mode cloud",
Expand Down
27 changes: 22 additions & 5 deletions apps/builder/src/widgetLibrary/DataGridWidget/dataGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ import {
} from "@mui/x-data-grid-premium"
import { GridApiPremium } from "@mui/x-data-grid-premium/models/gridApiPremium"
import { get, isArray, isNumber, isPlainObject } from "lodash"
import { FC, MutableRefObject, useEffect, useMemo, useRef } from "react"
import {
FC,
MutableRefObject,
useCallback,
useEffect,
useMemo,
useRef,
} from "react"
import { useDispatch } from "react-redux"
import { getColor } from "@illa-design/react"
import { dealRawData2ArrayData } from "@/page/App/components/InspectPanel/PanelSetters/DataGridSetter/utils"
Expand Down Expand Up @@ -67,8 +74,8 @@ export const DataGridWidget: FC<BaseDataGridProps> = (props) => {

const isInnerDragging = useRef(false)

const toolbar = () => {
return (
const toolbar = useCallback(
() => (
<Toolbar
columnSetting={columnSetting}
densitySetting={densitySetting}
Expand All @@ -81,8 +88,18 @@ export const DataGridWidget: FC<BaseDataGridProps> = (props) => {
triggerEventHandler("onRefresh")
}}
/>
)
}
),
[
columnSetting,
densitySetting,
exportAllSetting,
exportSetting,
filterSetting,
quickFilterSetting,
refreshSetting,
triggerEventHandler,
],
)

useEffect(() => {
updateComponentRuntimeProps({
Expand Down

0 comments on commit c2ca4ab

Please sign in to comment.