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

This commit is contained in:
RUNZE LU 2023-12-08 16:01:24 +08:00 committed by GitHub
parent 78b053d9c0
commit 52da9b663b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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