fix: nicos suggestions
This commit is contained in:
committed by
Nicolás Hatcher Andrés
parent
35323df20e
commit
cc01556387
@@ -77,9 +77,10 @@ function SheetTab(props: SheetTabProps) {
|
|||||||
}
|
}
|
||||||
}, [name, isEditing]);
|
}, [name, isEditing]);
|
||||||
|
|
||||||
|
// We want to change the layout only when editingName changes, but the layout is controlled by the hidden measure element (measureRef).
|
||||||
|
// biome-ignore lint/correctness/useExhaustiveDependencies: false
|
||||||
useLayoutEffect(() => {
|
useLayoutEffect(() => {
|
||||||
if (isEditing && measureRef.current) {
|
if (isEditing && measureRef.current) {
|
||||||
void editingName;
|
|
||||||
const width = measureRef.current.offsetWidth;
|
const width = measureRef.current.offsetWidth;
|
||||||
setInputWidth(Math.max(width + 8, 6));
|
setInputWidth(Math.max(width + 8, 6));
|
||||||
}
|
}
|
||||||
@@ -355,7 +356,6 @@ const StyledInput = styled(Input)`
|
|||||||
font-weight: inherit;
|
font-weight: inherit;
|
||||||
min-width: 6px;
|
min-width: 6px;
|
||||||
margin-right: 2px;
|
margin-right: 2px;
|
||||||
outline-offset: 1px;
|
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
& .MuiInputBase-input {
|
& .MuiInputBase-input {
|
||||||
@@ -363,8 +363,8 @@ const StyledInput = styled(Input)`
|
|||||||
background-color: ${theme.palette.common.white};
|
background-color: ${theme.palette.common.white};
|
||||||
font-weight: inherit;
|
font-weight: inherit;
|
||||||
padding: 6px 0px;
|
padding: 6px 0px;
|
||||||
outline: 1px solid ${theme.palette.primary.main};
|
border: 1px solid ${theme.palette.primary.main};
|
||||||
border-radius: 2px;
|
border-radius: 4px;
|
||||||
color: ${theme.palette.common.black};
|
color: ${theme.palette.common.black};
|
||||||
text-align: center;
|
text-align: center;
|
||||||
will-change: width;
|
will-change: width;
|
||||||
|
|||||||
Reference in New Issue
Block a user