Skip to content

Commit d6f7d05

Browse files
committed
removes controlled input
1 parent dee02ef commit d6f7d05

File tree

6 files changed

+6
-11
lines changed

6 files changed

+6
-11
lines changed

dist/css/rhinostyle.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/scripts/rhinostyle.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/scripts/rhinostyle.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/css/rhinostyle-docs.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/scripts/rhinostyle-docs.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/scripts/components/Input.jsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ class Input extends React.Component {
4444
}
4545

4646
handleChange = (event) => {
47-
if (!this.props.controlledInput) {
48-
this.setState({ value: event.target.value });
49-
}
47+
this.setState({ value: event.target.value });
5048
if (this.props.onChange) {
5149
if (this.props.format) {
5250
this.props.onChange(event.target.name, event.target.rawValue.trimLeft(), event.target.value);
@@ -132,7 +130,6 @@ class Input extends React.Component {
132130
type,
133131
validationMessage,
134132
dataFeatureTag,
135-
controlledInput,
136133
} = this.props;
137134

138135
const inputClasses = cx('form__control', customInputClasses, {
@@ -215,7 +212,6 @@ class Input extends React.Component {
215212
data-cypress={dataFeatureTag}
216213
data-feature-tag={dataFeatureTag}
217214
readOnly={readOnly}
218-
controlledInput={controlledInput}
219215
ref={(ref) => (this.input = ref)}
220216
{...customHTMLAttributes} // Note, only 'standard' custom attributes such as 'data-' or 'aria-' will be passed to the DOM
221217
/>
@@ -318,7 +314,6 @@ Input.propTypes = {
318314
validationMessage: PropTypes.string,
319315
onInput: PropTypes.func,
320316
id: PropTypes.string,
321-
controlledInput: PropTypes.bool,
322317
};
323318

324319
Input.defaultProps = {

0 commit comments

Comments
 (0)