Skip to content

Commit 981c88c

Browse files
Fixing 'Types' column display issue on DevicesList page
1 parent e211724 commit 981c88c

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

src/app/clientApp/Devices/List/DevicesListPage/Tabs/Tab1.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ const Tab1 = forwardRef<Tab1RefType, Props>((props, ref) => {
156156
setOwning(false)
157157
}
158158
}
159+
console.log('TOTO')
159160

160161
const columns = useMemo(
161162
() => [
@@ -170,12 +171,12 @@ const Tab1 = forwardRef<Tab1RefType, Props>((props, ref) => {
170171
</Link>
171172
)
172173
},
173-
style: { width: '100%' },
174+
style: { width: '100%', maxWidth: '300px' },
174175
},
175176
{
176177
Header: 'Types',
177178
accessor: 'types',
178-
style: { maxWidth: '350px', width: '100%' },
179+
style: { maxWidth: '300px', width: '150px', minWidth: '150px' },
179180
Cell: ({ value }: { value: any }) => {
180181
if (!value) {
181182
return null
@@ -199,15 +200,15 @@ const Tab1 = forwardRef<Tab1RefType, Props>((props, ref) => {
199200
{
200201
Header: 'ID',
201202
accessor: 'id',
202-
style: { maxWidth: '350px', width: '100%' },
203+
style: { maxWidth: '350px', minWidth: '200px' },
203204
Cell: ({ value }: { value: any }) => {
204205
return <span className='no-wrap-text'>{value}</span>
205206
},
206207
},
207208
{
208209
Header: _(t.ownershipStatus),
209210
accessor: 'ownershipStatus',
210-
style: { width: '250px' },
211+
style: { width: '150px' },
211212
Cell: ({ value }: { value: any }) => {
212213
const isOwned = OWNED === value
213214

@@ -267,7 +268,7 @@ const Tab1 = forwardRef<Tab1RefType, Props>((props, ref) => {
267268
const dataToDisplay = data || []
268269

269270
return (
270-
<div style={{ height: '100%', display: 'flex' }}>
271+
<div style={{ height: '100%', display: 'flex', width: '100%' }}>
271272
<DevicesList
272273
collapsed={collapsed ?? false}
273274
columns={columns}

src/components/Organisms/DevicesList/DevicesList.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const DevicesList: FC<Props> = (props) => {
3636
ref={ref}
3737
style={{
3838
height: '100%',
39+
width: '100%',
3940
display: 'flex',
4041
flexDirection: 'column',
4142
overflow: 'hidden',

0 commit comments

Comments
 (0)