Skip to content

Commit 0baee4d

Browse files
committed
revert changes to the docs
1 parent 2c8cf3e commit 0baee4d

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

docs/RadioButtonGroupInput.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,17 @@ const choices = [
9494
/>
9595
```
9696

97+
You can render some options as disabled by setting the `disabled` field in some choices:
98+
99+
```jsx
100+
const choices = [
101+
{ id: 'tech', name: 'Tech' },
102+
{ id: 'lifestyle', name: 'Lifestyle' },
103+
{ id: 'people', name: 'People', disabled: true },
104+
];
105+
<RadioButtonGroupInput source="category" choices={choices} />
106+
```
107+
97108
The choices are translated by default, so you can use translation identifiers as choices:
98109

99110
```jsx
@@ -282,19 +293,6 @@ However, in some cases, you may not want the choice to be translated. In that ca
282293

283294
Note that `translateChoice` is set to `false` when `<RadioButtonGroupInput>` is a child of `<ReferenceInput>`.
284295

285-
## Disabled `choices`
286-
287-
You can render some options as disabled by setting the `disabled` field in some choices:
288-
289-
```jsx
290-
const choices = [
291-
{ id: 'tech', name: 'Tech' },
292-
{ id: 'lifestyle', name: 'Lifestyle' },
293-
{ id: 'people', name: 'People', disabled: true },
294-
];
295-
<RadioButtonGroupInput source="category" choices={choices} />
296-
```
297-
298296
## Fetching Choices
299297

300298
You can use [`useGetList`](./useGetList.md) to fetch choices. For example, to fetch a list of countries for a user profile:

0 commit comments

Comments
 (0)