Skip to content

Commit

Permalink
fix(SearchSelect): 修复SearchSelect使用多选属性时,禁用样式问题 #789 (#801)
Browse files Browse the repository at this point in the history
  • Loading branch information
cuilanxin committed Apr 29, 2022
1 parent 3d8c55a commit 171906a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion packages/react-search-select/src/index.tsx
Expand Up @@ -274,7 +274,12 @@ export default function SearchSelect(props: SearchSelectProps) {
.join(' ')
.trim()}
>
<div className={`${prefixCls}-tag-content`}>
<div
className={[`${prefixCls}-tag-content`, disabled && `${prefixCls}-tag-content-disabled`]
.filter(Boolean)
.join(' ')
.trim()}
>
{isMultiple &&
selectedValue.slice(0, maxTagCount).map((item, index) => {
return (
Expand Down
6 changes: 4 additions & 2 deletions packages/react-search-select/src/style/index.less
Expand Up @@ -83,7 +83,7 @@
.w-input-small .w-input-inner {
height: 16px;
font-size: 10px;
padding: 0px;
padding: 0;
}

.w-input-large .w-input-inner {
Expand All @@ -99,7 +99,9 @@
width: 100%;
padding: 0 9px;
}

&-tag-content-disabled {
background: #dddddd;
}
&-search-false {
cursor: pointer;
}
Expand Down

0 comments on commit 171906a

Please sign in to comment.