Skip to content

Commit 9849049

Browse files
committed
Updated Readme with code examples, removed onBlur on Select Input
1 parent ca315d4 commit 9849049

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ Bindings for using [Formik](https://github.com/jaredpalmer/formik) with [Reactst
44
## Getting Started
55

66
npm install formik-material-ui
7+
8+
## Usage Examples
9+
* Text Input [Example](https://codesandbox.io/s/xl6mx6w8z4)
10+
* Select Input [Example](https://codesandbox.io/s/6l3oo28kq3)
11+
* Radio Input [Example](https://codesandbox.io/s/0vm7yo754w)
712

813
## Development
914

src/components/ReactstrapSelectInput.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import * as React from 'react';
22
import {FormGroup, Input, Label} from "reactstrap";
33

4-
let handleBlur = event => {
4+
/*let handleBlur = event => {
55
if (this.ignoreNextBlur === true) {
66
// The parent components are relying on the bubbling of the event.
77
event.stopPropagation();
88
this.ignoreNextBlur = false;
99
event.target.name = this.props.name;
1010
return;
1111
}
12-
};
12+
};*/
1313

1414
const ReactstrapSelectInput = ({
1515
field,
@@ -23,7 +23,7 @@ const ReactstrapSelectInput = ({
2323
<FormGroup>
2424
<Label for={field.name} className={"label-color"}>{props.inputprops.label}</Label>
2525
<Input {...field} {...props} type="select" invalid={Boolean(touched[field.name] && errors[field.name])}
26-
onBlur={handleBlur()} placeholder="Test">
26+
placeholder="Test">
2727
<option value="">{props.inputprops.label}</option>
2828
{props.inputprops.options.map((option, index) => {
2929
if (option.name)

0 commit comments

Comments
 (0)