mirror of
https://github.com/R0m1k3/CollectFlow.git
synced 2026-10-20 21:48:33 +02:00
perf(grid): optimize state store with O(1) row indexing and debounced summary calculations
This commit is contained in:
1 parent
8f2c4c77ba
commit
d75102fb18
6 files changed
+86
-37
No files matched your search
@@ -5,7 +5,7 @@ import { useSession } from "next-auth/react";
|
||||
import { BulkAiAnalyzer } from "./bulk-ai-analyzer";
|
||||
import { useSaveDrafts } from "@/features/grid/hooks/use-save-drafts";
|
||||
import { Loader2, CheckCircle, AlertCircle, RotateCcw, Camera, ChevronDown } from "lucide-react";
|
||||
import { useState, useTransition } from "react";
|
||||
import { useMemo, useState, useTransition } from "react";
|
||||
import { saveSnapshot } from "@/features/snapshots/api/save-snapshot";
|
||||
import { SuccessModal } from "@/components/shared/success-modal";
|
||||
import {
|
||||
@@ -45,7 +45,7 @@ export function FloatingSummaryBar() {
|
||||
message: ""
|
||||
});
|
||||
|
||||
const visibleCodeins = rows.map(r => r.codein);
|
||||
const visibleCodeins = useMemo(() => rows.map(r => r.codein), [rows]);
|
||||
const { save, hasDrafts, count } = useSaveDrafts(filters.magasin || "TOTAL", visibleCodeins);
|
||||
|
||||
const handleSave = () => {
|
||||
|
||||
Reference in new issue
Block a user