Skip to content

Commit 913a944

Browse files
authored
fix(transfer): fix tree disabled and drag sort bug (#3412)
* fix(transfer): fix tree disabled and drag sort bug * chore: revert demo change
1 parent 223488f commit 913a944

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/transfer/components/transfer-list.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,6 @@ export default mixins(keepAnimationMixins, classPrefixMixins).extend({
265265

266266
newData.splice(sourceIndex, 1);
267267

268-
if (draggingIndex < dragoverIndex) {
269-
targetIndex -= 1;
270-
}
271-
272268
if (dragoverPos === 'bottom') {
273269
targetIndex += 1;
274270
}

src/transfer/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function getDataValues(
5656
if (data) {
5757
for (let i = 0; i < data.length; i++) {
5858
const item = data[i];
59-
const isInclude = filterValues.includes(item.value);
59+
const isInclude = filterValues.includes(item.value) && !item.disabled;
6060
if (!include && isInclude) {
6161
continue; // 排除模式下子元素一律排除
6262
}

0 commit comments

Comments
 (0)