feat: pagination for tables with deleted station directions

This commit is contained in:
2025-12-24 15:43:25 +03:00
parent 39e11ad5ca
commit a3d574a79c
20 changed files with 448 additions and 302 deletions

View File

@@ -12,10 +12,14 @@ export const SnapshotListPage = observer(() => {
snapshotStore;
const [isDeleteModalOpen, setIsDeleteModalOpen] = useState(false);
const [rowId, setRowId] = useState<string | null>(null); // Lifted state
const [rowId, setRowId] = useState<string | null>(null);
const { language } = languageStore;
const [isRestoreModalOpen, setIsRestoreModalOpen] = useState(false);
const [isLoading, setIsLoading] = useState(false);
const [paginationModel, setPaginationModel] = useState({
page: 0,
pageSize: 50,
});
useEffect(() => {
const fetchSnapshots = async () => {
@@ -87,9 +91,10 @@ export const SnapshotListPage = observer(() => {
<DataGrid
rows={rows}
columns={columns}
hideFooterPagination
hideFooter
loading={isLoading}
paginationModel={paginationModel}
onPaginationModelChange={setPaginationModel}
pageSizeOptions={[50]}
localeText={ruRU.components.MuiDataGrid.defaultProps.localeText}
slots={{
noRowsOverlay: () => (