Skip to content

Commit

Permalink
fix Locale Picker and small picker styles
Browse files Browse the repository at this point in the history
  • Loading branch information
parasharrajat committed Aug 24, 2021
1 parent 396e320 commit bf73f5c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/ExpensiPicker.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {PureComponent} from 'react';
import React, {Component} from 'react';
import {Text, View} from 'react-native';
import PropTypes from 'prop-types';
import Picker from './Picker';
Expand All @@ -17,7 +17,7 @@ const defaultProps = {
isDisabled: false,
};

class ExpensiPicker extends PureComponent {
class ExpensiPicker extends Component {
constructor() {
super();
this.state = {
Expand Down
4 changes: 4 additions & 0 deletions src/components/Picker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ const Picker = ({
fixAndroidTouchableBug
onOpen={onOpen}
onClose={onClose}
pickerProps={{
onFocus: onOpen,
onBlur: onClose,
}}
/>
);

Expand Down
4 changes: 3 additions & 1 deletion src/libs/actions/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ function setCurrentURL(url) {
* @param {String} locale
*/
function setLocale(locale) {
API.PreferredLocale_Update({name: 'preferredLocale', value: locale});
if (currentUserAccountID) {
API.PreferredLocale_Update({name: 'preferredLocale', value: locale});
}
Onyx.merge(ONYXKEYS.NVP_PREFERRED_LOCALE, locale);
}

Expand Down
3 changes: 3 additions & 0 deletions src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ const styles = {
borderRadius: variables.componentBorderRadius,
borderWidth: 1,
borderColor: themeColors.border,
borderStyle: 'solid',
color: themeColors.text,
height: variables.componentSizeSmall,
opacity: 1,
Expand All @@ -385,6 +386,7 @@ const styles = {
borderWidth: 1,
borderRadius: variables.componentBorderRadius,
borderColor: themeColors.border,
borderStyle: 'solid',
color: themeColors.text,
appearance: 'none',
height: variables.componentSizeSmall,
Expand All @@ -402,6 +404,7 @@ const styles = {
borderWidth: 1,
borderRadius: variables.componentBorderRadius,
borderColor: themeColors.border,
borderStyle: 'solid',
color: themeColors.text,
height: variables.componentSizeSmall,
opacity: 1,
Expand Down

0 comments on commit bf73f5c

Please sign in to comment.