How to map model with a boolean value to RadioButton in Vaadin hilla

46 Views Asked by At

I have below react code

const {field, model, read} = useForm(MyModel);
 <VerticalLayout style={{ alignItems: 'stretch', width: '18rem', maxWidth: '100%' }}>
                    <TextField label="Title" {...field(model.title)} />
                    <NumberField label="Order" {...field(model.order)} />
                    <RadioGroup label="Status" {...field(model.isEnabled)} >
                        <RadioButton value="true" label="Enable" />
                        <RadioButton value="false" label="Disabled" />
                    </RadioGroup>
                </VerticalLayout>

when i am changing its value using

read(model);

its giving below error on browser:

The radio button with the value "true" was not found.

0

There are 0 best solutions below