toystars / react-native-multiple-select

Simple multi-select component for react-native
MIT License
565 stars 313 forks source link

hideSubmitButton was breaking the dropdown icon #216

Open alexsandersarmento opened 1 year ago

alexsandersarmento commented 1 year ago

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native-multiple-select@0.5.12 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-multiple-select/lib/react-native-multi-select.js b/node_modules/react-native-multiple-select/lib/react-native-multi-select.js
index 9b7a0d7..2d8302e 100644
--- a/node_modules/react-native-multiple-select/lib/react-native-multi-select.js
+++ b/node_modules/react-native-multiple-select/lib/react-native-multi-select.js
@@ -611,7 +611,7 @@ export default class MultiSelect extends Component {
                 value={searchTerm}
                 {...textInputProps}
               />
-              {hideSubmitButton && (
+              {/* {hideSubmitButton && (
                 <TouchableOpacity onPress={this._submitSelection}>
                   <Icon
                     name="menu-down"
@@ -622,7 +622,7 @@ export default class MultiSelect extends Component {
                     ]}
                   />
                 </TouchableOpacity>
-              )}
+              )} */}
               {!hideDropdown && (
                 <Icon
                   name="arrow-left"
@@ -718,7 +718,7 @@ export default class MultiSelect extends Component {
                       {this._getSelectLabel()}
                     </Text>
                     <Icon
-                      name={hideSubmitButton ? 'menu-right' : 'menu-down'}
+                      name="menu-down"
                       style={[
                         styles.indicator,
                         styleIndicator && styleIndicator,

This issue body was partially generated by patch-package.