1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-21 19:37:28 +00:00

Merge branch 'master' into 13.0

This commit is contained in:
Michael An
2025-02-20 17:59:59 +08:00
3 changed files with 7 additions and 8 deletions

View File

@@ -32,6 +32,7 @@ class TransferDialog extends React.Component {
constructor(props) {
super(props);
this.state = {
options: [],
selectedOption: null,
errorMsg: [],
transferToUser: true,
@@ -39,7 +40,6 @@ class TransferDialog extends React.Component {
reshare: false,
activeTab: !this.props.isDepAdminTransfer ? TRANS_USER : TRANS_DEPART
};
this.options = [];
this.userSelect = React.createRef();
}
@@ -83,7 +83,7 @@ class TransferDialog extends React.Component {
}
updateOptions = (departmentsRes) => {
this.options = departmentsRes.data.map(item => {
const options = departmentsRes.data.map(item => {
let option = {
value: item.name,
email: item.email,
@@ -91,6 +91,7 @@ class TransferDialog extends React.Component {
};
return option;
});
this.setState({ options });
};
onClick = () => {
@@ -182,7 +183,7 @@ class TransferDialog extends React.Component {
hideSelectedOptions={true}
components={makeAnimated()}
placeholder={gettext('Select a department')}
options={this.options}
options={this.state.options}
onChange={this.handleSelectChange}
value={this.state.selectedOption}
className="transfer-repo-select-department"