Commit b3450e14 authored by Oleksii Savran's avatar Oleksii Savran

fixed partner filter width

parent a5ecb1ab
Pipeline #7537 passed with stages
in 4 minutes and 38 seconds
......@@ -21,7 +21,7 @@ const styles = (theme) => ({
color: '#000',
},
select: {
minWidth: '240px',
width: '100%',
},
shortName: {
minWidth: '6em',
......@@ -29,6 +29,12 @@ const styles = (theme) => ({
marginRight: '0.5em',
overflow: 'hidden' as 'hidden',
},
fullName: {
whiteSpace: 'normal' as 'normal',
},
menuItem: {
height: 'auto' as 'auto',
},
});
interface ISelectPartnerProps extends React.ClassAttributes<any> {
......@@ -101,12 +107,15 @@ class SelectPartner extends React.Component<ISelectPartnerProps, any> {
return (
<FormControl fullWidth required={ required } meta={ meta } label={ t(label) }>
<Select error={ meta.touched && meta.error } className={ classes.select } value={ useUuid ? val || '' : val && val.uuid || '' } onChange={ this.handleChange }
<Select autoWidth error={ meta.touched && meta.error } className={ classes.select } value={ useUuid ? val || '' : val && val.uuid || '' } onChange={ this.handleChange }
input={ <Input /> }
>
{ allowNull && <MenuItem key="noPartner" value=""><em>{ t('partners.public.c.select.select') }</em></MenuItem> }
{ partners && partners.sort((a, b) => a.shortName.localeCompare(b.shortName)).map((p) =>
<MenuItem key={ p.uuid } value={ p.uuid }><span className={ classes.shortName }>{ p.shortName }</span><Markdown source={ p.name }/></MenuItem>)
<MenuItem className={ classes.menuItem } key={ p.uuid } value={ p.uuid }>
<span className={ classes.shortName }>{ p.shortName }</span>
<Markdown className={ classes.fullName } source={ p.name }/>
</MenuItem>)
}
</Select>
</FormControl>
......
......@@ -27,6 +27,7 @@ const styles = (theme) => ({
top: '72px',
zIndex: 10,
height: 'calc(100vh - 72px)',
flex: '0 0 0',
'& > div': {
top: 'auto' as 'auto',
position: 'initial' as 'initial',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment