Skip to content
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

<input> element ought to be controllable #21

Closed
Giners opened this issue Jan 31, 2018 · 0 comments
Closed

<input> element ought to be controllable #21

Giners opened this issue Jan 31, 2018 · 0 comments
Labels

Comments

@Giners
Copy link
Owner

Giners commented Jan 31, 2018

The <input> element that is rendered ought to be controllable externally. This will allow <MUIPlacesAutocomplete> to meet an expanded breadth of use cases. An example of one use case would be allowing <MUIPlacesAutocomplete> to integrate with Redux Form.

@Giners Giners added the feature label Jan 31, 2018
Giners added a commit that referenced this issue Jan 31, 2018
This commit implements functionality that allows the <input> element
rendered by the MUI <TextField> component to be controlled externally.
This is done by passing the value of the <input> element as the
'inputValue' prop on the <Downshift> component we render.

This commit satisfies the work of: #21
	modified:   README.md
	modified:   demo/Demo.jsx
	copied:     demo/Demo.jsx -> demo/DemoBasic.jsx
	new file:   demo/DemoControlledInput.jsx
	new file:   demo/rootReducer.js
	modified:   package.json
	modified:   src/MUIPlacesAutocomplete.jsx
	modified:   test/test.jsx
	modified:   yarn.lock
Giners added a commit that referenced this issue Feb 1, 2018
PR #22 sought to introduce new functionality that would allow the
<input> element rendered by the MUI <TextField> component to be
controlled externally. After some initial feedback and talking to Matt
about it some it was obvious that I went about implementing this
functionality incorrectly in commit
e27d465. After re-reading the docs for
Downshift and MUI <TextField> this commit re-implements the
functionality in a more consistent fashion with how Downshift/MUI are
documented/expected to be used.
	modified:   README.md
	modified:   demo/DemoControlledInput.jsx
	modified:   src/MUIPlacesAutocomplete.jsx
	modified:   test/test.jsx
@Giners Giners closed this as completed in 6d6727d Feb 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant