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