Skip to content

Commit df72775

Browse files
committed
🐛 [Select]解决多选下拉框搜索功能异常的问题
1 parent 0375dab commit df72775

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/components/select/views/multi-select.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export default function MultiSelect(props) {
103103
const views = useMemo(
104104
() => Children.map(options, (child, index) => cloneElement(child, {
105105
...child.props,
106-
...(dataSource?.[index]?.props || {}),
106+
disabled: (dataSource?.[index]?.props || child.props)?.disabled,
107107
hideCheckbox:
108108
supportUnlimited && !child.props.value && child.props.value !== 0,
109109
multiple: true,
@@ -131,6 +131,7 @@ export default function MultiSelect(props) {
131131

132132
useEffect(() => {
133133
const result = filterOptions(dataSource, searchValue);
134+
console.log(searchValue, dataSource, result);
134135
setOptions(result);
135136
}, [ searchValue ]);
136137

0 commit comments

Comments
 (0)