Auto-CAPS postcode input

[Closes #78]
This commit is contained in:
Tom Russell 2018-10-25 11:57:58 +01:00
parent ca6992c8be
commit 7f8683a1b9

View File

@ -60,9 +60,14 @@ class EditForm extends Component {
handleChange(event) {
const target = event.target;
const value = (target.value === '')? null : target.value;
let value = (target.value === '')? null : target.value;
const name = target.name;
// special transform - consider something data driven before adding 'else if's
if (name === 'location_postcode' && value !== null) {
value = value.toUpperCase();
}
this.setState({
[name]: value
});