Skip to content

Commit

Permalink
fix: (regression 0.55.0) admin/plugins: some options dialog could be …
Browse files Browse the repository at this point in the history
…unstable (eg: upload-quota)
  • Loading branch information
rejetto committed Jan 5, 2025
1 parent 015276f commit eccfcf9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion admin/src/DataTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import _ from 'lodash'
import { Center, Flex } from './mui'
import { SxProps } from '@mui/system'
import { state, updateStateObject } from './state'
import { useDebounce } from 'usehooks-ts'

const ACTIONS = 'Actions'

Expand Down Expand Up @@ -95,7 +96,7 @@ export function DataTable({ columns, initialState={}, actions, actionsProps, ini
return ret
}, [columns, actions, actionsLength])
const sizeGrid = useGetSize()
const width = sizeGrid.w || 0
const width = useDebounce(sizeGrid.w || 0, 500) // stabilize width
const hideCols = useMemo(() => {
const fields = onlyTruthy(manipulatedColumns.map(({ field, hideUnder, hidden }) =>
(hidden || hideUnder && width < (typeof hideUnder === 'number' ? hideUnder : theme.breakpoints.values[hideUnder]))
Expand Down

0 comments on commit eccfcf9

Please sign in to comment.