diff --git a/src/components/dropdownButton/view/dropdownButtonView.js b/src/components/dropdownButton/view/dropdownButtonView.js index b5d28fa52..8c1ca7fcd 100644 --- a/src/components/dropdownButton/view/dropdownButtonView.js +++ b/src/components/dropdownButton/view/dropdownButtonView.js @@ -17,9 +17,22 @@ import styles from './dropdownButtonStyles'; * */ -const renderDropdownRow = (rowData, rowID, highlighted, rowTextStyle, noHighlight) => ( +const renderDropdownRow = ( + rowData, + rowID, + highlighted, + rowTextStyle, + noHighlight, + dropdownRowWrapper, +) => ( - + ( null} renderRow={(rowData, rowID, highlighted) => - renderDropdownRow(rowData, rowID, highlighted, rowTextStyle, noHighlight) + renderDropdownRow( + rowData, + rowID, + highlighted, + rowTextStyle, + noHighlight, + dropdownRowWrapper, + ) } > {isHasChildIcon && !isLoading ? ( diff --git a/src/components/points/view/pointsStyles.js b/src/components/points/view/pointsStyles.js index c10a793c9..70aa8afb6 100644 --- a/src/components/points/view/pointsStyles.js +++ b/src/components/points/view/pointsStyles.js @@ -15,15 +15,13 @@ export default EStyleSheet.create({ alignSelf: 'center', flex: 1, }, - dropdownWrapper: { - flex: 1, - }, dropdownRowText: { fontSize: 14, color: '$primaryDarkGray', + textAlign: 'center', }, - dropdownStyle: { - minWidth: '$deviceWidth * 0.7', + dropdownRowStyle: { + marginLeft: 0, }, dropdownButtonStyle: { justifyContent: 'center', diff --git a/src/components/points/view/pointsView.js b/src/components/points/view/pointsView.js index 26950b752..3ac3f7bf7 100644 --- a/src/components/points/view/pointsView.js +++ b/src/components/points/view/pointsView.js @@ -31,6 +31,8 @@ class PointsView extends Component { constructor(props) { super(props); this.state = {}; + + this.dropdownRef = React.createRef(); } // Component Functions @@ -72,6 +74,10 @@ class PointsView extends Component { return {intl.formatMessage({ id: 'points.no_activity' })}; }; + _showDropdown = () => { + this.dropdownRef.current.show(); + }; + render() { const { claimPoints, @@ -89,8 +95,12 @@ class PointsView extends Component { - {get(userPoints, 'points')} + + {get(userPoints, 'points')} +