What is the way to sort alphabetically the "reason.Name" in picker in my example ? if i use the lodash so how should i do that ?
import { Picker } from '@react-native-picker/picker';
import _, { filter } from 'lodash';
<Picker
mode="dropdown"
selectedValue={selectedValue3}
style={{
placeholderTextColor: 'black',
transform: [{ scaleY: 1.2 }, { scaleX: 1.2 }],
}}
onValueChange={(itemValue, itemIndex) => {
dispatch(setCurrentTabInfoAction({ reason: foundReason?.Name }))
}}
>
{listReasons3.map((reason, i) => (
<Picker.Item label={reason.Name} value={reason.Code} key={i} />
))}
</Picker>