-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Fixed controlled TextField with multiline and autoAdjustHeight does not adjust when setting value via state #3942
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
… value is changed via prop update.
| } as ITextFieldState); | ||
| } as ITextFieldState, | ||
| () => { | ||
| this._adjustInputHeight(); |
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.
_adjustInputHeight [](start = 15, length = 18)
Can you please add a change file with "patch" for textfield
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.
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.
@manishgarg1 when I run that command it prints the following:
Starting "rush change"
Target branch is origin/master
No change file is needed.
What should I do?
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.
@nero120 Try npm run change -- -b upstream/master (rush is comparing your changes to master, but since your changes were committed to your master branch, this will compare it to Fabric's master)
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.
@erichdev nope:
ERROR: Command failed: git diff upstream/master... --dirstat=files,0
fatal: ambiguous argument 'upstream/master...': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
I confess to not understanding why this doesn't 'just work', I haven't done anything particularly unique here - doesn't everyone submit a pull request from their fork's master branch?
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.
"upstream" is a remote name. Do you have a git remote pointing to officedev? You can add it like so:
git remote add upstream https://github.com/OfficeDev/office-ui-fabric-react.gitThere 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.
Thanks @dzearing, but after running your command then npm run change -- -b upstream/master I get the error:
Starting "rush change"
Target branch is upstream/master
fatal: ambiguous argument 'upstream/master...': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Is there some other way I can create this file or can you accept the pull request without it?
manishgarg1
left a comment
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.
🕐
Pull request checklist
$ npm run change(reports No change file is needed)Description of changes
Updated TextField component so that _adjustInputHeight is called when value is changed via prop update. This ensures the height is adjusted when value updates for a controlled TextField (with multiline and autoAdjustHeight true).
Focus areas to test
(optional)