Skip to content

Controlled TextFields#3796

Merged
gokunymbus merged 13 commits into
microsoft:masterfrom
jordandrako:#1350-controlled-textfield
Jan 31, 2018
Merged

Controlled TextFields#3796
gokunymbus merged 13 commits into
microsoft:masterfrom
jordandrako:#1350-controlled-textfield

Conversation

@jordandrako

@jordandrako jordandrako commented Jan 24, 2018

Copy link
Copy Markdown
Contributor

Pull request checklist

Description of changes

Adds the _isControlled flag to the TextField component that disabled onChange if the value prop is set, which follows developer expectations with React inputs.

Focus areas to test

This is a breaking change, developers using value instead of defaultValue will need to change to defaultValue if the field needs to be user-editable.

@jordandrako jordandrako changed the base branch from master to 6.0 January 25, 2018 16:17
@jordandrako jordandrako changed the base branch from 6.0 to master January 25, 2018 16:18
@gokunymbus

Copy link
Copy Markdown
Contributor

Looks like there are some errors when building your project.

Warning: Failed prop type: You provided a value prop to a form field without an onChange handler. This will render a read-only field. If the field should be mutable use defaultValue. Otherwise, set either onChange or readOnly.

I think the Jest tests are now failing.

@gokunymbus gokunymbus merged commit b17a45f into microsoft:master Jan 31, 2018
@jordandrako jordandrako deleted the #1350-controlled-textfield branch January 31, 2018 18:34
@jordandrako jordandrako restored the #1350-controlled-textfield branch January 31, 2018 18:34
gokunymbus added a commit that referenced this pull request Feb 1, 2018
gokunymbus added a commit that referenced this pull request Feb 1, 2018
* Revert "Updating config files in @uifabric/icons package (#3851)"

This reverts commit 952ad79.

* Revert "Addressing Issue #3776 - Sticky component loops forever if background-color is not set for page (#3833)"

This reverts commit ddc5440.

* Revert "Fix issue in modal Selection handling (#3836)"

This reverts commit c304b01.

* Revert "Adding new WOFF files to the @uifabric/icons/fonts folder (#3848)"

This reverts commit 66a91aa.

* Revert "Controlled TextFields (#3796)"

This reverts commit b17a45f.
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 31, 2019
@msft-github-bot

Copy link
Copy Markdown
Contributor

🎉This issue was addressed in #14836, which has now been successfully released as @fluentui/[email protected].:tada:

Handy links:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Controlled TextField allows modification apart from value prop

3 participants