Skip to content

Commit 6345d1e

Browse files
Added styling prop "styleIndicator" to change the styling of indicator Icon. Used it wherever styles.indicator was used.
1 parent ffdce1a commit 6345d1e

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ The component takes 3 compulsory props - `items`, `uniqueKey` and `onSelectedIte
161161
| styleTextDropdown | No | (Text Style) Style text of the Dropdown |
162162
| styleTextDropdownSelected | No | (Text Style) Style text of the Dropdown selected |
163163
| styleTextTag | No | (Text Style) Style text of the tag |
164+
| styleIndicator | No | (Style) Style the Icon for indicator |
164165
| submitButtonColor | No | (String) Background color for submit button |
165166
| submitButtonText | No | (String) Text displayed on submit button |
166167
| tagBorderColor | No | (String) Border color for each selected item |

lib/react-native-multi-select.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export default class MultiSelect extends Component {
6565
styleTextDropdown: Text.propTypes.style,
6666
styleTextDropdownSelected: Text.propTypes.style,
6767
styleTextTag: Text.propTypes.style,
68+
styleIndicator: ViewPropTypes.style,
6869
altFontFamily: PropTypes.string,
6970
hideSubmitButton: PropTypes.bool,
7071
hideDropdown: PropTypes.bool,
@@ -572,7 +573,8 @@ export default class MultiSelect extends Component {
572573
styleSelectorContainer,
573574
styleTextDropdown,
574575
styleTextDropdownSelected,
575-
searchIcon
576+
searchIcon,
577+
styleIndicator,
576578
} = this.props;
577579
const { searchTerm, selector } = this.state;
578580
return (
@@ -613,7 +615,8 @@ export default class MultiSelect extends Component {
613615
name="menu-down"
614616
style={[
615617
styles.indicator,
616-
{ paddingLeft: 15, paddingRight: 15 }
618+
{ paddingLeft: 15, paddingRight: 15 },
619+
styleIndicator && styleIndicator,
617620
]}
618621
/>
619622
</TouchableOpacity>
@@ -714,7 +717,10 @@ export default class MultiSelect extends Component {
714717
</Text>
715718
<Icon
716719
name={hideSubmitButton ? 'menu-right' : 'menu-down'}
717-
style={styles.indicator}
720+
style={[
721+
styles.indicator,
722+
styleIndicator && styleIndicator,
723+
]}
718724
/>
719725
</View>
720726
</TouchableWithoutFeedback>

0 commit comments

Comments
 (0)