WrathChaos / react-native-dynamic-search-bar

Medium Article: https://freakycoder.com/react-native-library-dynamic-search-bar-c03fea9fae36
MIT License
481 stars 52 forks source link

Extend length of Textfield to full length of search box...? #4

Closed juddey closed 5 years ago

juddey commented 5 years ago

Hello, using your lib, thanks for making it!

I've found a small annoyance and I'm wondering if you can assist. When you click on the search box anywhere other than the direct 'Search...' text, the onPress handler activates. I'm not sure if this was by design, but i'd expect a press on a search box to activate the keyboard or something similar, otherwise you just get a press action, and what seems like no result.

I've created the video below to demonstrate the problem. In this screen cap I'm clicking in between the search text and the X (cancel), and you can see the "meaningless" press.

untitled

Is there any chance this behaviour could be changed?

WrathChaos commented 5 years ago

Hello @juddey, I also noticed that annoying action :) I will try to fix it or at least make an option to disable the annoying "onPress" action. Actually, In one of my projects search bar's onPress is also a need therefore, I make it like that. I will fix it ASAP.

Thank you for using it :)

WrathChaos commented 5 years ago

Hello @juddey, I fixed it and provides a good feature for it: onPressToFocus. You can see the new release:

Release: 0.2.0

Please check it out and give me feedback for it :)

WrathChaos commented 5 years ago

I just closed the issue, please give me a feedback about the new version 0.2.0 :) If you need anything feels free to open a new issue.

juddey commented 5 years ago

Thanks @WrathChaos! I will give it a try and let you know. Update: I have tried it, and it works well, I have used the onPressToFocus prop :shipit:

WrathChaos commented 5 years ago

@juddey I love to hear that :) If you need something else, open an issue :)