Map caching in Redis

This commit is contained in:
cracklesparkle
2024-08-23 17:50:53 +09:00
parent 97b44a4db7
commit 579bbf7764
23 changed files with 688 additions and 143 deletions

View File

@ -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 (