Skip to content

Commit 2cf65c7

Browse files
committed
Fix linting errors in AddRecordDrawer and CollectionTable
1 parent 88cfed7 commit 2cf65c7

2 files changed

Lines changed: 2 additions & 11 deletions

File tree

frontend/src/components/AddRecordDrawer.jsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,9 @@ export default function AddRecordDrawer({
2020
isSubmitting = false,
2121
initialData = null,
2222
}) {
23-
const [formData, setFormData] = useState({});
23+
const [formData, setFormData] = useState(initialData || {});
2424
const [errors, setErrors] = useState({});
2525

26-
useEffect(() => {
27-
if (isOpen) {
28-
setFormData(initialData || {});
29-
setErrors({});
30-
}
31-
}, [isOpen, initialData]);
32-
33-
34-
3526
// Handle outside click to close
3627
useEffect(() => {
3728
const handleKeyDown = (e) => {

frontend/src/components/CollectionTable.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export default function CollectionTable({ data, activeCollection, onDelete, onVi
164164
),
165165
},
166166
];
167-
}, [activeCollection, onDelete, onView]);
167+
}, [activeCollection, onDelete, onView, onEdit]);
168168

169169
// 2. Load Persisted State
170170
const storageKey = `table-settings-${activeCollection?._id}`;

0 commit comments

Comments
 (0)