mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-05 05:41:46 +08:00
Refactor out getCountryCodeOption()
This commit is contained in:
@ -188,16 +188,15 @@ class OrganizationEditPage extends React.Component {
|
||||
</Col>
|
||||
<Col span={22} >
|
||||
<Select virtual={false} mode={"multiple"} style={{width: "100%"}} value={this.state.organization.countryCodes ?? []}
|
||||
options={Setting.getCountriesData().map(country => {
|
||||
return Setting.getOption(
|
||||
<>
|
||||
{Setting.countryFlag(country)}
|
||||
{`${country.name} +${country.phone}`}
|
||||
</>,
|
||||
country.code);
|
||||
})} onChange={value => {
|
||||
onChange={value => {
|
||||
this.updateOrganizationField("countryCodes", value);
|
||||
}} />
|
||||
}}
|
||||
filterOption={(input, option) => (option?.text ?? "").toLowerCase().includes(input.toLowerCase())}
|
||||
>
|
||||
{
|
||||
Setting.getCountryCodeData().map((country) => Setting.getCountryCodeOption(country))
|
||||
}
|
||||
</Select>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row style={{marginTop: "20px"}} >
|
||||
|
Reference in New Issue
Block a user