Skip to content

Commit 4c70183

Browse files
committed
fix column width issues
1 parent 5a4b478 commit 4c70183

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

app/src/ui/LensTable/Table/Header.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ const headCells: readonly HeadCell[] = [
1818
},
1919
{
2020
id: 'focalLength',
21-
numeric: true,
21+
numeric: false,
2222
disablePadding: false,
2323
label: 'Focal Length',
2424
},
2525
{
2626
id: 'aperture',
27-
numeric: true,
27+
numeric: false,
2828
disablePadding: false,
2929
label: 'Aperture',
3030
},
3131
{
3232
id: 'sensorKey',
33-
numeric: true,
33+
numeric: false,
3434
disablePadding: false,
3535
label: 'Sensor',
3636
},

app/src/ui/LensTable/Table/Row/FocalLength.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { InputAdornment, TextField } from '@mui/material'
22
import { ChangeEvent } from 'react'
33
import useDoFStore from '../../../../store'
4+
import useIsMobile from '../../../../utilities/useIsMobile'
45

56
export default function FocalLength({ lens }: { lens: LensDefinition }) {
67
const { updateLens } = useDoFStore()
8+
const isMobile = useIsMobile()
79
const onChange = (event: ChangeEvent<HTMLInputElement>) => {
810
updateLens({ ...lens, focalLength: parseFloat(event.target.value) })
911
}
@@ -28,6 +30,7 @@ export default function FocalLength({ lens }: { lens: LensDefinition }) {
2830
data-testid={`focal-length-${lens.id}`}
2931
autoComplete="off"
3032
size="small"
33+
fullWidth={isMobile}
3134
/>
3235
)
3336
}

app/src/ui/Main.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function Main() {
1717
useAddPlaceholderLenses(hasReadFromHash, hasReadFromStorage)
1818

1919
return (
20-
<Box>
20+
<>
2121
<Box my={3}>
2222
<TopToolbar />
2323
</Box>
@@ -29,6 +29,6 @@ export default function Main() {
2929
<Box mb={2} height={400} width="100%">
3030
<Graph />
3131
</Box>
32-
</Box>
32+
</>
3333
)
3434
}

0 commit comments

Comments
 (0)