Map caching in Redis
This commit is contained in:
@ -22,20 +22,20 @@ import {
|
||||
} from '@mui/x-data-grid';
|
||||
|
||||
interface EditToolbarProps {
|
||||
setRows: (newRows: (oldRows: GridRowsProp) => GridRowsProp) => void;
|
||||
setRows: (newRows: (oldRows: GridRowsProp) => GridRowsProp) => void
|
||||
setRowModesModel: (
|
||||
newModel: (oldModel: GridRowModesModel) => GridRowModesModel,
|
||||
) => void;
|
||||
columns: GridColDef[];
|
||||
autoComplete?: React.ReactElement | null;
|
||||
) => void
|
||||
columns: GridColDef[]
|
||||
autoComplete?: React.ReactElement | null
|
||||
}
|
||||
|
||||
function EditToolbar(props: EditToolbarProps) {
|
||||
const { setRows, setRowModesModel, columns, autoComplete } = props;
|
||||
const { setRows, setRowModesModel, columns, autoComplete } = props
|
||||
|
||||
const handleClick = () => {
|
||||
const id = Date.now().toString(36)
|
||||
const newValues: any = {};
|
||||
const newValues: any = {}
|
||||
|
||||
columns.forEach(column => {
|
||||
if (column.type === 'number') {
|
||||
@ -59,7 +59,7 @@ function EditToolbar(props: EditToolbarProps) {
|
||||
setRowModesModel((oldModel) => ({
|
||||
...oldModel,
|
||||
[id]: { mode: GridRowModes.Edit, fieldToFocus: columns[0].field },
|
||||
}));
|
||||
}))
|
||||
};
|
||||
|
||||
return (
|
||||
|
Reference in New Issue
Block a user