Repository navigation
fix(text-input): apply flexShrink to root container to avoid parent b… #5140
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,9 @@ import { tokens } from '../../theme/tokens'; | |
| const { bodyLarge, bodySmall } = tokens.md.sys.typescale; | ||
|
|
||
| export const styles = StyleSheet.create({ | ||
| root: { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there is no way to opt out: since this changes layout for every existing consumer, could the consumer style be merged into root so apps can override it? |
||
| flexShrink: 1, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. one small concern: On iPhone 16 Pro simulator with a column of
Same pattern in card (
|
||
| }, | ||
| input: { | ||
| paddingVertical: 0, | ||
| paddingHorizontal: 0, | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't reproduce horizontal blowout this fixes.
On iPhone 16 Pro simulator,
TextInputinsideflexDirection: 'row'parent produces 0% differing pixels betweenmain& this branch - with long value, with/without label and with 100/300pt width constraint. The root stays ~32pt wide & sibling is never pushed outAlso worth checking whether this is still reproducible: #4790 was opened before TextInput rewrite in #4909 and it has no runnable repro.
so may I ask you to share repro (lib version + platform) you're seeing this on?