akveo / akveo/react-native-ui-kitten
Autocomplete blocks button press
- Vorherrschende Sprache
- TypeScript
- Sterne
- 10.7k
- Forks
- 962
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Thank you for creating this amazing library. I am facing an issue while using Autocomplete component.
## 🐛 Bug Report
Autocomplete's list makes me press the button rendered next to it twice when the focus is within the Autocomplete input
## To Reproduce
My parent component looks like below:
```
```
And the autocomplete is rendered in the child component like so:
```
{languages.length ? (
{languages.join(', ')}
) : (
(maximum 5 languages)
)}
{autocompleteLanguages.map(renderOption)}
}
status="primary"
disabled={!allowLangSelect || !!autocompleteLanguages.length}
onPress={onAdd}
style={{ marginLeft: spacing(2), height: 30 }}
>
Add
{!allowLangSelect ? '(maximum 5)' : ''}
```
If the value is not present, I add the Autocomplete query by pressing the button rendered next to it to add the value to my selected list of options.
E.g Let's see I have 2 options i.e English and Spanish. The user types German which is not present in the available set of options. User can add this value by clicking the add button rendered next to the Autocomplete component.
On the first press, the keyboard gets dismissed and the button doesn't get pressed. But, if I click inside the input again and then click on button it works. Again, if I press on the input and then try to click the button, then the keyboard gets dismissed but the button won't get pressed. I am pretty sure it's happening because of the Autocomplete's list as with normal Input component, everything works as expected.
## Expected behavior
Button should get pressed with a single click instead of clicking again after the keyboard dismisses.
## UI Kitten and Eva version
| Package | Version |
| ----------- | ----------- |
| @eva-design/eva | 2.1.1 |
| @ui-kitten/components | 5.1.1 |
## Environment information
```bash
System:
OS: macOS 12.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Binaries:
Node: 14.17.1 - ~/.nvm/versions/node/v14.17.1/bin/node
Yarn: 1.22.17 - ~/.nvm/versions/node/v14.17.1/bin/yarn
npm: 7.19.1 - ~/.nvm/versions/node/v14.17.1/bin/npm
Watchman: 2021.12.20.00 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK:
API Levels: 29, 30, 31
Build Tools: 29.0.2, 29.0.3, 30.0.2, 30.0.3
System Images: android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7935034
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
npmPackages:
react: 17.0.2 => 17.0.2
react-native: 0.66.4 => 0.66.4
```
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.