From 35323df20e866e474ee5034a0fe27217735abf5c Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 21 Nov 2025 01:13:52 +0100 Subject: [PATCH] fix: copilot's suggestions --- .../src/components/SheetTabBar/SheetTab.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/webapp/IronCalc/src/components/SheetTabBar/SheetTab.tsx b/webapp/IronCalc/src/components/SheetTabBar/SheetTab.tsx index ca80e51..b0ef55a 100644 --- a/webapp/IronCalc/src/components/SheetTabBar/SheetTab.tsx +++ b/webapp/IronCalc/src/components/SheetTabBar/SheetTab.tsx @@ -94,8 +94,11 @@ function SheetTab(props: SheetTabProps) { const handleSave = () => { if (editingName.trim() !== "") { props.onRenamed(editingName.trim()); + setIsEditing(false); + } else { + setEditingName(name); + setIsEditing(false); } - setIsEditing(false); }; const handleCancel = () => { @@ -153,18 +156,14 @@ function SheetTab(props: SheetTabProps) { onClick={(e) => e.stopPropagation()} spellCheck={false} /> - + ) : ( <> {name} - + @@ -361,6 +360,7 @@ const StyledInput = styled(Input)` flex-grow: 1; & .MuiInputBase-input { font-family: Inter; + background-color: ${theme.palette.common.white}; font-weight: inherit; padding: 6px 0px; outline: 1px solid ${theme.palette.primary.main};