-
Notifications
You must be signed in to change notification settings - Fork 734
Fixed the ChipsInput field trimmed bug #2183
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
Conversation
…m the Input component style.
Ethan please take a look at this PR, I removed the felxGrow prop from the Input component that fix the bug. |
src/incubator/TextField/Input.tsx
Outdated
@@ -45,7 +44,7 @@ const Input = ({ | |||
|
|||
const styles = StyleSheet.create({ | |||
input: { | |||
flexGrow: 1, |
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 checked why we added this flexGrow.
We did it in this PR
#1734
But unfortunately, I can't reproduce the bug it was meant to fix.
We can merge the PR and worse case we can revert if the bug appear again.
Another option is to pass a style that overrides the flexGrow
from the ChipsInput code.
What do you prefer to do?
src/incubator/ChipsInput/index.tsx
Outdated
@@ -142,6 +142,7 @@ const ChipsInput = forwardRef((props: ChipsInputProps, refToForward: React.Ref<a | |||
ref={fieldRef} | |||
leadingAccessory={chipList} | |||
blurOnSubmit={false} | |||
style={{flexGrow: undefined}} |
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.
Don't pass inline styles
It creates a new object ref every render which triggers subsequent re-renders for inner components that depends on this prop
Description
ChipsInput field get trimmed when inserting more than 1 line of chips.
Changelog
ChipsInput field get trimmed when inserting more than 1 line of chips.