Commit 8b7b4e8 1 parent 6ddbdd7 commit 8b7b4e8 Copy full SHA for 8b7b4e8
File tree 1 file changed +22
-11
lines changed
client/packages/system/src/Item/Components/ItemOptionRenderer
1 file changed +22
-11
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import { ItemRowWithStatsFragment , ItemStockOnHandFragment } from '../../api' ;
3
3
import { ItemOption } from '../../utils' ;
4
+ import { Tooltip } from '@common/components' ;
4
5
5
6
export const getItemOptionRenderer =
6
7
( label : string , formatNumber : ( value : number ) => string ) =>
7
8
(
8
9
props : React . HTMLAttributes < HTMLLIElement > ,
9
10
item : ItemStockOnHandFragment | ItemRowWithStatsFragment
10
11
) => (
11
- < ItemOption { ...props } key = { item . code } >
12
- < span style = { { whiteSpace : 'nowrap' , width : 100 } } > { item . code } </ span >
13
- < span style = { { whiteSpace : 'normal' , width : 500 } } > { item . name } </ span >
14
- < span
15
- style = { {
16
- width : 200 ,
17
- textAlign : 'right' ,
18
- // whiteSpace: 'wrap',
19
- } }
20
- > { `${ formatNumber ( item . availableStockOnHand ) } ${ label } ` } </ span >
21
- </ ItemOption >
12
+ < Tooltip title = { `${ item . code } ${ item . name } ` } >
13
+ < ItemOption { ...props } key = { item . code } >
14
+ < span
15
+ style = { {
16
+ whiteSpace : 'nowrap' ,
17
+ width : 150 ,
18
+ overflow : 'hidden' ,
19
+ textOverflow : 'ellipsis' ,
20
+ } }
21
+ >
22
+ { item . code }
23
+ </ span >
24
+ < span style = { { whiteSpace : 'normal' , width : 500 } } > { item . name } </ span >
25
+ < span
26
+ style = { {
27
+ width : 200 ,
28
+ textAlign : 'right' ,
29
+ } }
30
+ > { `${ formatNumber ( item . availableStockOnHand ) } ${ label } ` } </ span >
31
+ </ ItemOption >
32
+ </ Tooltip >
22
33
) ;
You can’t perform that action at this time.
0 commit comments