afraid-scarlet
afraid-scarlet9mo ago

how to code Edit form with Chakra RadioGroup form component

unable to populate default value of radio
6 Replies
kapa.ai
kapa.ai9mo ago
Hi @brandonkhj. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- In Refine, you can set a default value for a radio button field using the defaultValue property in the useRadioGroup hook. Here is an example:
const { selectProps } = useRadioGroup({
resource: "languages",
defaultValue: 1,
});
const { selectProps } = useRadioGroup({
resource: "languages",
defaultValue: 1,
});
In this example, the radio button with the value of 1 will be selected by default. For more details, you can refer to the useRadioGroup documentation (https://refine.dev/docs/api-reference/antd/hooks/field/useRadioGroup/). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai9mo ago
<@391513391870640138> kapa.ai is still learning and improving, please let us know how it did by reacting below
afraid-scarlet
afraid-scarlet9mo ago
@kapa.ai with chakraui
kapa.ai
kapa.ai9mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- I'm sorry, but the provided extracts do not contain information on how to set a default value for a radio button field using Chakra UI in the context of the Refine framework. For more specific information, you may want to refer to the official Refine documentation (https://refine.dev/docs) or the Chakra UI documentation (https://chakra-ui.com/docs/form/radio). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai9mo ago
<@391513391870640138> kapa.ai is still learning and improving, please let us know how it did by reacting below
fascinating-indigo
fascinating-indigo9mo ago
Hello @brandonkhj could you give more details on your issue?