Skip to content

Commit a01778a

Browse files
committed
fix: 품목번호 빈 칸으로 수정 가능하도록 수정
1 parent 8e049a0 commit a01778a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/app/(auth)/rental/page.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,13 @@ export default function RentalPage() {
220220
const handleItemCodeSave = (rentalHistoryId: number) => {
221221
const trimmed = editingItemCodeValue.trim();
222222
setEditingItemCodeId(null);
223-
if (!trimmed) return;
223+
const value = trimmed || null;
224224

225-
setOptimisticItemCodes((prev) => ({ ...prev, [rentalHistoryId]: trimmed }));
225+
setOptimisticItemCodes((prev) => ({ ...prev, [rentalHistoryId]: value }));
226226

227227
updateItemCode({
228228
rentalHistoryId,
229-
data: { itemCode: trimmed },
229+
data: { itemCode: value },
230230
})
231231
.then(() => {
232232
queryClient.invalidateQueries({ queryKey: ['/admin/rentals'] });

0 commit comments

Comments
 (0)