I've created a redux-form and i want to add className to each Field to customize them with css. The code for each field is:
<Form onSubmit={handleSubmit(requestAccountsFilter)}>
<FormGroup row>
<Field
id="symbol"
name="symbol"
type="text"
component={inputField}
placeholder="Enter Product Here"
/>
<Field id="side" name="side" component={inputField} type="select">
<option value={null}>Any</option>
<option value="Buy">Buy</option>
<option value="Sell">Sell</option>
</Field>
<Field id="status" name="status" component={inputField} type="select">
<option value={null}>Any</option>
<option value="Working">Working</option>
<option value="Completed">Completed</option>
</Field>
<Button name="submit-btn" className="filter-submit-btn" color="danger" type="submit">
Submit
</Button>
</FormGroup>
</Form>
I've added a className tag but i see that neither the placeholder i've added is shown nor the className. How can i customize each field?
inputField
function looks like. Can you show it to us? – HalfpriceField
will be available in yourinputField
component. So in yourinputField
component, you just need to destructure props like<inputField {...this.props} />
. In this way all the props that you pass toField
will be available in yourinputField
component.` – Diverticulum