fix: Select移动端组件多选且设置menuTpl时无法选择 Close: #9005 (#9042)

This commit is contained in:
RUNZE LU 2023-12-08 16:04:17 +08:00 committed by GitHub
parent da8dfbee2d
commit 30348b2ee7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -345,15 +345,26 @@ export default class SelectMobile extends React.Component<Props, SelectState> {
> >
{renderMenu ? ( {renderMenu ? (
multiple ? ( multiple ? (
renderMenu(item, { <>
multiple, <div
checkAll, title={item[labelField]}
checked, className={cx('Select-option-item-check')}
onChange: () => this.handleChange(item), onClick={() => !item.disabled && this.handleChange([item])}
inputValue: inputValue || '', >
searchable, {renderMenu(item, {
index multiple,
}) checkAll,
checked,
onChange: () => this.handleChange(item),
inputValue: inputValue || '',
searchable,
index
})}
</div>
{checked ? (
<Icon icon="check" className={cx('Select-option-mcheck')} />
) : null}
</>
) : ( ) : (
renderMenu(item, { renderMenu(item, {
multiple, multiple,