Fixed controlled TextField with multiline and autoAdjustHeight does not adjust when setting value via state#3942
Conversation
… value is changed via prop update.
| } as ITextFieldState); | ||
| } as ITextFieldState, | ||
| () => { | ||
| this._adjustInputHeight(); |
There was a problem hiding this comment.
_adjustInputHeight [](start = 15, length = 18)
Can you please add a change file with "patch" for textfield
There was a problem hiding this comment.
There was a problem hiding this comment.
@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.
@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.
@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.
"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.
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?
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)