feat: - Update select and select multiple fields to get list in alphabetical order - Close #59
This commit is contained in:
parent
b2cb5182bc
commit
cabe183f27
3 changed files with 16 additions and 8 deletions
|
|
@ -1,5 +1,11 @@
|
|||
# CHANGELOG
|
||||
|
||||
## 3.2.1
|
||||
|
||||
### Évolution - 3.2.1
|
||||
|
||||
- Update select and select multiple fields to get list in alphabetical order
|
||||
|
||||
## 3.1.1
|
||||
|
||||
### Évolution - 3.1.1
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ android {
|
|||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 1
|
||||
versionName "3.1.1"
|
||||
versionName "3.2.1"
|
||||
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
||||
|
||||
if (isNewArchitectureEnabled()) {
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ class ContactDetailsScreen extends React.Component {
|
|||
contact.email.length >= 255 ||
|
||||
!Helpers.isEmailValid(contact.email)
|
||||
) {
|
||||
console.debug('invalid prop email');
|
||||
console.debug('invalid prop email', contact.email);
|
||||
error = error.concat(i18n.t('error.invalid_email_address') + '.\n');
|
||||
}
|
||||
const lockedFields = ['firstname', 'lastname', 'phone'];
|
||||
|
|
@ -1292,12 +1292,12 @@ class ContactDetailsScreen extends React.Component {
|
|||
'contact_details_s.input_select_multiple_search',
|
||||
)}
|
||||
confirmText={i18n.t('global.close')}
|
||||
items={details.map(function (detail, detailIndex) {
|
||||
return {
|
||||
items={details
|
||||
.map((detail, detailIndex) => ({
|
||||
id: detailIndex,
|
||||
name: detail,
|
||||
};
|
||||
})}
|
||||
}))
|
||||
.sort((a, b) => a.name.localeCompare(b.name))}
|
||||
IconRenderer={this.getIcon}
|
||||
uniqueKey="id"
|
||||
selectText={`${placeHolder} ${requiredStr}`}
|
||||
|
|
@ -1535,8 +1535,10 @@ class ContactDetailsScreen extends React.Component {
|
|||
label={i18n.t('contact_details_s.input_select_please_choose')}
|
||||
value={''}
|
||||
/>
|
||||
{details.map((detail, detailIndex) => (
|
||||
<Picker.Item key={detailIndex} label={detail} value={detailIndex} />
|
||||
{details.map((detail, index) => ({ label: detail, value: index }))
|
||||
.sort((a, b) => a.label.localeCompare(b.label))
|
||||
.map((item, index) => (
|
||||
<Picker.Item key={index} label={item.label} value={item.value} />
|
||||
))}
|
||||
</Picker>
|
||||
</View>,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue