fix nested-select style

This commit is contained in:
rickcole 2020-04-20 20:55:11 +08:00
parent de2689ba6b
commit 300d4257d8
2 changed files with 7 additions and 4 deletions

View File

@ -95,8 +95,7 @@
}
&-menu {
width: 160px;
max-width: 160px;
min-width: 160px;
max-height: px2rem(300px);
background: $Form-select-menu-bg;
color: $Form-select-menu-color;
@ -113,7 +112,7 @@
.#{$ns}NestedSelect-option {
position: relative;
padding-left: px2rem(10px);
height: $Form-input-height;
min-height: $Form-input-height;
line-height: $Form-input-height;
cursor: pointer;
display: flex;

View File

@ -361,7 +361,11 @@ export default class NestedSelectControl extends React.Component<
return (
<>
{stack.map((options, index) => (
<div key={index} className={cx('NestedSelect-menu')}>
<div
key={index}
className={cx('NestedSelect-menu')}
style={{minWidth: this.target.offsetWidth}}
>
{index === 0 ? searchInput : null}
{multiple && index === 0 ? (
<div className={cx('NestedSelect-option', 'checkall')}>