Skip to content

Feature Request: Default values for radio buttons #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Lucasmiguelmac opened this issue Apr 30, 2022 · 2 comments
Closed

Feature Request: Default values for radio buttons #45

Lucasmiguelmac opened this issue Apr 30, 2022 · 2 comments

Comments

@Lucasmiguelmac
Copy link

As of today, we are not able to set default values for radio buttons with a value field like we can do with other fields.

  const fields = [
	{
		"type": "radio",
		"name": "my-name",
		"extra": {
			"items": [
				{
					"value": 1,
					"title": "One",
					"name": "one"
				},
				{
					"value": 2,
					"title": "Two",
					"name": "two"
				},
				{
					"value": 3,
					"title": "Three",
					"name": "three"
				},
				{
					"value": 4,
					"title": "Four",
					"name": "four"
				}
			]
		},
		"value": 4 // --> won't do anything
}
  ];

Example repl.

@Lucasmiguelmac
Copy link
Author

Just made a PR for this. It should fix this. Though I'm not sure on how to test it.

@kamalkech
Copy link
Collaborator

@Lucasmiguelmac thank you for your investigation, i already working to build next version with different updates and fixes many issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants