toystars / react-native-multiple-select

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

Search input autofocus not working in Android at first time multiselect click #187

Open shanu95 opened 3 years ago

shanu95 commented 3 years ago

At 1st time Multiselect drop down click not open keyboard automatically. This problem is only on Android. In iOS it's working properly. I have added textInputProps={{autoFocus:true}} but still the same. Any fixes?

               `<Scrollview>
                <MultiSelect
                hideTags
                items={items}
                flatListProps={{keyboardShouldPersistTaps: 'handled'}}
                uniqueKey="Id"
                **textInputProps={{autoFocus:true}}**
                onSelectedItemsChange={onSelectedItemIDChange}
                selectText="Product"
                single={true}
                fixedHeight={true}
                selectedItems={selectedItemID}
                ref={multiSelect}
                searchInputPlaceholderText="Search Products..."
                onChangeInput={text => console.log(text)}
                tagRemoveIconColor="#CCC"
                tagBorderColor="#CCC"
                tagTextColor="#CCC"
                selectedItemTextColor="#10b34c"
                selectedItemIconColor="#10b34c"
                itemTextColor="#000"
                styleDropdownMenuSubsection={{
                  borderColor: 'white',
                  marginBottom: -10,
                }}
                styleTextTag={{
                  fontSize: 14,
                  marginRight: 10,
                }}
                tagContainerStyle={{
                  height: 32,
                  marginLeft: 10,
                  marginRight: 10,
                  display: 'flex',
                  justifyContent: 'center',
                  paddingLeft: 5,
                  paddingRight: 5,
                }}
                styleListContainer={{
                  marginBottom:10,
                }}
                styleSelectorContainer={{paddingBottom:40}}
                displayKey="Name"
                searchInputStyle={{color: '#CCC'}}
                submitButtonColor="#10b34c"
                submitButtonText="Submit"
                hideSubmitButton={true}
              />
              </Scrollview>`