[5.0.0-rc.9] SearchBar component not respecting default font
See original GitHub issueCurrent behaviour
The Searchbar
component is not utilizing the custom default font set in the RNP theme.
Expected behaviour
Component renders using the custom theme font.
How to reproduce?
Simply use the Searchbar
component using a custom font.
Preview
I believe the issue lies here in the Searchbar component logic:
style={[
styles.input,
{
color: textColor,
...(!isV3 && theme.fonts.regular),
...Platform.select({ web: { outline: 'none' } }),
},
inputStyle,
]}
What have you tried so far?
To circumvent this, Im using the inputStyle
prop to override the incorrect default:
inputStyle={{
fontFamily: theme.fonts.bodyLarge.fontFamily,
}}
Your Environment
software | version |
---|---|
ios | x |
android | x |
react-native | x.x.x |
react-native-paper | 5.0.0-rc.9 |
node | x.x.x |
npm or yarn | x.x.x |
expo sdk | x.x.x |
Issue Analytics
- State:
- Created 10 months ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Change the font size of UISearchBar - ios - Stack Overflow
I suggest yet a different option for iOS 5.0 and up: [[UITextField appearanceWhenContainedIn:[UISearchBar class], nil] setFont:[UIFont systemFontOfSize:14 ...
Read more >Titanium SDK 9.3.0.RC - 1 December 2020
Titanium SDK 9.3.0 is a minor release of the SDK, addressing high-priority issues from previous releases. As of this release, Titanium SDK 9.2.x...
Read more >Deploy Red Hat Quay on OpenShift with Quay Operator
It is recommended that you install the Operator cluster-wide. If you choose a single namespace, the monitoring component will not be available by...
Read more >material-ui/core/CHANGELOG.md - UNPKG
9, - System package 💎 & Box component 🛠️ ... Following our API guideline, we can no longer use a boolean property, it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sure, what branch should I use as base and to what branch should I create the PR?
Hey @bombillazo, would you like to handle the support for it in the
Searchbar
, by adding the ternary expression theretheme.isV3 ? theme.fonts.default : theme.fonts.regular
?