Skip to content

ChispInput backspase fix for Android #1151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 26, 2021
Merged

Conversation

vidmantasz
Copy link
Contributor

@vidmantasz vidmantasz commented Jan 25, 2021

Description

There is an issue in react-native lib. facebook/react-native#29689
onChangeText is called before onKeyPress on Android - state.input are empty when deleting last character. Debounce fixes execution order.

onKeyPress is called properly for backspace button. No need additional event listener.
DeviceEventEmitter.addListener('onBackspacePress', this.onKeyPress);
Found out this caused double onKeyPress events.

Changelog

Fixed ChipsInput backspace tag removal issue on Android.

@ethanshar ethanshar requested review from M-i-k-e-l and removed request for ethanshar and Inbal-Tish January 25, 2021 11:51
@vidmantasz vidmantasz requested a review from ethanshar January 25, 2021 11:56
Copy link
Collaborator

@M-i-k-e-l M-i-k-e-l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice ❗
Maybe share this in the ticket you've mentioned?

@M-i-k-e-l M-i-k-e-l merged commit e3d5ae5 into master Jan 26, 2021
@vidmantasz vidmantasz deleted the chipsinput-backspace-fix branch November 17, 2021 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants