From 129df7dc2a720816c0783dc8b3bee94c26ddc8ab Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 12 Jul 2016 12:09:12 +0800 Subject: [PATCH 1/2] Fix removed upload item bug, close #2342 --- components/upload/index.jsx | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/components/upload/index.jsx b/components/upload/index.jsx index 2cc2b26601..198d067aab 100644 --- a/components/upload/index.jsx +++ b/components/upload/index.jsx @@ -140,21 +140,25 @@ export default class Upload extends React.Component { } catch (e) { /* do nothing */ } let fileList = this.state.fileList; let targetItem = getFileItem(file, fileList); - // 之前已经删除 - if (targetItem) { - targetItem.status = 'done'; - targetItem.response = response; - this.onChange({ - file: targetItem, - fileList, - }); + // removed + if (!targetItem) { + return; } + targetItem.status = 'done'; + targetItem.response = response; + this.onChange({ + file: targetItem, + fileList, + }); } onProgress = (e, file) => { let fileList = this.state.fileList; let targetItem = getFileItem(file, fileList); - if (!targetItem) return; + // removed + if (!targetItem) { + return; + } targetItem.percent = e.percent; this.onChange({ event: e, @@ -167,6 +171,10 @@ export default class Upload extends React.Component { this.clearProgressTimer(); let fileList = this.state.fileList; let targetItem = getFileItem(file, fileList); + // removed + if (!targetItem) { + return; + } targetItem.error = error; targetItem.response = response; targetItem.status = 'error'; From cf978908e80abc92cd221d686355168ee99a09e3 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 12 Jul 2016 12:17:19 +0800 Subject: [PATCH 2/2] Fix overflow combobox, close #2353 --- components/select/style/index.less | 1 - 1 file changed, 1 deletion(-) diff --git a/components/select/style/index.less b/components/select/style/index.less index d50372f9a1..ba7ed1e0f3 100644 --- a/components/select/style/index.less +++ b/components/select/style/index.less @@ -355,7 +355,6 @@ .@{select-prefix-cls}-selection__rendered { padding: 0; height: 100%; - overflow: visible; } } }