mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-03 16:10:26 +00:00
fix (#2530)
This commit is contained in:
@@ -44,6 +44,7 @@ class AddReviewerDialog extends React.Component {
|
|||||||
loadOptions = (value, callback) => {
|
loadOptions = (value, callback) => {
|
||||||
if (value.trim().length > 0) {
|
if (value.trim().length > 0) {
|
||||||
seafileAPI.searchUsers(value.trim()).then((res) => {
|
seafileAPI.searchUsers(value.trim()).then((res) => {
|
||||||
|
this.Options = [];
|
||||||
for (let i = 0 ; i < res.data.users.length; i++) {
|
for (let i = 0 ; i < res.data.users.length; i++) {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.value = res.data.users[i].name;
|
obj.value = res.data.users[i].name;
|
||||||
@@ -53,7 +54,6 @@ class AddReviewerDialog extends React.Component {
|
|||||||
<img src={res.data.users[i].avatar_url} className="avatar reviewer-select-avatar" alt=""/>
|
<img src={res.data.users[i].avatar_url} className="avatar reviewer-select-avatar" alt=""/>
|
||||||
<span className='reviewer-select-name'>{res.data.users[i].name}</span>
|
<span className='reviewer-select-name'>{res.data.users[i].name}</span>
|
||||||
</React.Fragment>;
|
</React.Fragment>;
|
||||||
this.Options.splice(0, this.Options.length);
|
|
||||||
this.Options.push(obj);
|
this.Options.push(obj);
|
||||||
}
|
}
|
||||||
callback(this.Options);
|
callback(this.Options);
|
||||||
|
Reference in New Issue
Block a user