mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Grammar correction in ReactDOMInput.js warning (#6657)
Changed "a uncontrolled input" to "an uncontrolled input".
(cherry picked from commit 393a1798fa)
This commit is contained in:
committed by
Paul O’Shannessy
parent
ff3cec5beb
commit
d1f519e0cd
@@ -169,7 +169,7 @@ var ReactDOMInput = {
|
||||
) {
|
||||
warning(
|
||||
false,
|
||||
'%s is changing a uncontrolled input of type %s to be controlled. ' +
|
||||
'%s is changing an uncontrolled input of type %s to be controlled. ' +
|
||||
'Input elements should not switch from uncontrolled to controlled (or vice versa). ' +
|
||||
'Decide between using a controlled or uncontrolled input ' +
|
||||
'element for the lifetime of the component. More info: https://fb.me/react-controlled-components',
|
||||
|
||||
@@ -488,7 +488,7 @@ describe('ReactDOMInput', function() {
|
||||
ReactDOM.render(<input type="text" value="controlled" />, container);
|
||||
expect(console.error.argsForCall.length).toBe(1);
|
||||
expect(console.error.argsForCall[0][0]).toContain(
|
||||
'A component is changing a uncontrolled input of type text to be controlled. ' +
|
||||
'A component is changing an uncontrolled input of type text to be controlled. ' +
|
||||
'Input elements should not switch from uncontrolled to controlled (or vice versa). ' +
|
||||
'Decide between using a controlled or uncontrolled input ' +
|
||||
'element for the lifetime of the component. More info: https://fb.me/react-controlled-components'
|
||||
@@ -530,7 +530,7 @@ describe('ReactDOMInput', function() {
|
||||
ReactDOM.render(<input type="checkbox" checked={true} />, container);
|
||||
expect(console.error.argsForCall.length).toBe(1);
|
||||
expect(console.error.argsForCall[0][0]).toContain(
|
||||
'A component is changing a uncontrolled input of type checkbox to be controlled. ' +
|
||||
'A component is changing an uncontrolled input of type checkbox to be controlled. ' +
|
||||
'Input elements should not switch from uncontrolled to controlled (or vice versa). ' +
|
||||
'Decide between using a controlled or uncontrolled input ' +
|
||||
'element for the lifetime of the component. More info: https://fb.me/react-controlled-components'
|
||||
@@ -572,7 +572,7 @@ describe('ReactDOMInput', function() {
|
||||
ReactDOM.render(<input type="radio" checked={true} />, container);
|
||||
expect(console.error.argsForCall.length).toBe(1);
|
||||
expect(console.error.argsForCall[0][0]).toContain(
|
||||
'A component is changing a uncontrolled input of type radio to be controlled. ' +
|
||||
'A component is changing an uncontrolled input of type radio to be controlled. ' +
|
||||
'Input elements should not switch from uncontrolled to controlled (or vice versa). ' +
|
||||
'Decide between using a controlled or uncontrolled input ' +
|
||||
'element for the lifetime of the component. More info: https://fb.me/react-controlled-components'
|
||||
|
||||
Reference in New Issue
Block a user