-
-
Notifications
You must be signed in to change notification settings - Fork 533
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
Button Group with integer keys doesn't display selected state in the CP #10915
Comments
Are you able to provide the full output of |
Sorry about that. I thought I provided the Statamic version at least, which I assume would be most important in this case, but I didn't. It's Statamic 5.30.0 (latest as of writing). Anyway I see there's a PR now fixing this issue. |
Can confirm. I stumbled upon this a few days ago as well! |
for example this: tabs:
main:
display: Main
sections:
-
fields:
-
handle: title
field:
type: text
required: true
width: 50
localizable: false
validate:
- required
display: Name
-
handle: stars
field:
options:
-
key: 1
value: '1'
-
key: 2
value: '2'
-
key: 3
value: '3'
-
key: 4
value: '4'
-
key: 5
value: '5'
default: 5
type: button_group
display: Sterne
localizable: false
width: 50
-
handle: quote
field:
type: textarea
display: Quote
localizable: true
-
handle: company
field:
type: text
display: Firma
localizable: false
width: 50
listable: true
validate:
- required
-
handle: position
field:
type: text
display: Position
localizable: true
width: 50
title: Testimonial As mentioned above, it's only about the selection state that is not displayed correctly. The data saves fine and correctly. |
Bug description
When using integers as keys in a Button Group fieldtype it doesn't show the selected state properly in the CP.
How to reproduce
Have a Button Group fieldtype with simple integers (1, 2, 3) as keys.
Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
The text was updated successfully, but these errors were encountered: