Skip to content

RadField value is convert to string in store #93

@BrunoQuaresma

Description

@BrunoQuaresma

I have.:

<Field
    label="Android"
    value={1}
    name="operational_system_id"
    type="radio"
    component={Radio}
    format={null}
  />

Radio is:

import { Radio as SnRadio } from 'supernova-inloco'

const Radio = ({ input, label }) => {
  return (
    <SnRadio
      {...input}
      label={label}
    />
  )
}

export default Radio

This cause a problem that when I click in the radio option it always come with checked equal to false because the value in radio is 1(number) and in the store is "1" (string).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions