refactor: improve code reuse rate (#1515)

This commit is contained in:
Yaodong Yu
2023-02-02 16:43:51 +08:00
committed by GitHub
parent f6a502f7ff
commit 19e7d0b0bd
9 changed files with 58 additions and 140 deletions

View File

@ -182,7 +182,10 @@ class UserEditPage extends React.Component {
{Setting.getLabel(i18next.t("general:Organization"), i18next.t("general:Organization - Tooltip"))} :
</Col>
<Col span={22} >
<Select virtual={false} style={{width: "100%"}} disabled={disabled} value={this.state.user.owner} onChange={(value => {this.updateUserField("owner", value);})}>
<Select virtual={false} style={{width: "100%"}} disabled={disabled} value={this.state.user.owner} onChange={(value => {
this.getApplicationsByOrganization(value);
this.updateUserField("owner", value);
})}>
{
this.state.organizations.map((organization, index) => <Option key={index} value={organization.name}>{organization.name}</Option>)
}