react-native-search-bar icon indicating copy to clipboard operation
react-native-search-bar copied to clipboard

Left Alignment of Placeholder Text?

Open joncursi opened this issue 8 years ago • 4 comments

The search icon and placeholder text are aligned center by default. Would be great if that could change to left-hand or right-hand alignment, depending on the use case. I.e. in Apple Maps, the search bar placeholder and icon is left-aligned:

img_2964

joncursi avatar Sep 14 '16 23:09 joncursi

Not sure what's the best way to add this functionality into our current setup. Placeholder alignment isn't supported natively for UISearchBar. In the example your posted, they're using a UITextField and handling the UISearchBarDelegate.

This is definitely something I'd like to have in the library though. Any suggestion you have would be appreciated.

iRoachie avatar Jan 05 '18 14:01 iRoachie

I think in iOS 11 the placeholder is default left aligned.

ocarreterom avatar Jan 14 '18 20:01 ocarreterom

A hack might be to just add spaces to the end of the placeholder text

mileung avatar Jan 08 '19 23:01 mileung

+1

maxgfr avatar Mar 26 '20 11:03 maxgfr