You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use case where I want to select the chkbox on the basis of data which I'm reading from an API.
So, If that particular checkbox was selected while posting to the data to the server, I want to make it selected then next time user looks for the same record.
I'm using these components: FormControlLabel from '@material-ui/core/FormControlLabel'
Checkbox from 'redux-form-material-ui'
and redux form
My Code is something like this-
<FormControlLabel
control={
<Field
name={${this.props.postParam}.${key}}
checked={ // some condition here on basis of remote api data }
component={this.checkboxAdapter}
/>
}
I have a use case where I want to select the chkbox on the basis of data which I'm reading from an API.
So, If that particular checkbox was selected while posting to the data to the server, I want to make it selected then next time user looks for the same record.
I'm using these components:
FormControlLabel from '@material-ui/core/FormControlLabel'
Checkbox from 'redux-form-material-ui'
and redux form
My Code is something like this-
<FormControlLabel
control={
<Field
name={
${this.props.postParam}.${key}
}checked={ // some condition here on basis of remote api data }
component={this.checkboxAdapter}
/>
}
checkboxAdapter(inputProps) {
console.log(inputProps)
return (
<Checkbox
{...inputProps}
value={inputProps.input.value}
onChange={inputProps.input.onChange}
checked={inputProps.checked}
/>);
}
The text was updated successfully, but these errors were encountered: