Merge pull request #4953 from meerkat-morecats/fix-4686

fix: transfer tree模式下右侧面板无法滚动  (#4686)
This commit is contained in:
RUNZE LU 2022-07-22 17:17:11 +08:00 committed by GitHub
commit 93c41505df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -628,7 +628,9 @@ export class Transfer<
const placeholder =
resultSearchPlaceholder || __('Transfer.selectFromLeft');
return resultSelectMode === 'table' ? (
switch (resultSelectMode) {
case 'table':
return (
<ResultTableList
classnames={cx}
columns={columns!}
@ -643,9 +645,12 @@ export class Transfer<
placeholder={placeholder}
onSearch={onResultSearch}
/>
) : resultSelectMode === 'tree' ? (
);
case 'tree':
return (
<ResultTreeList
classnames={cx}
className={cx('Transfer-value')}
options={options}
valueField={'value'}
value={value || []}
@ -655,7 +660,9 @@ export class Transfer<
placeholder={placeholder}
onSearch={onResultSearch}
/>
) : (
);
default:
return (
<ResultList
className={cx('Transfer-value')}
sortable={sortable}
@ -669,6 +676,7 @@ export class Transfer<
/>
);
}
}
render() {
const {