Skip to content
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

Unable to select integer options in Button Group #2331

Closed
michaellindahl opened this issue Aug 29, 2020 · 3 comments
Closed

Unable to select integer options in Button Group #2331

michaellindahl opened this issue Aug 29, 2020 · 3 comments

Comments

@michaellindahl
Copy link

Bug Description

I created a button group in Blueprint and the buttons were not selectable despite them looking identical to a button group I created earlier when looking at the yaml. (- 25% vs - 0)

When creating a button group, either in the yaml or Blueprint, integers must not be used, or if they are, the user must wrap them in quotes in the yaml after creating them in the control panel.

How to Reproduce

Create a button group in the Control Panel using Blueprint:
image

or create them in the Blueprint yaml:

        handle: image_padding
        field:
          options:
            - 0
            - 1
            - 2
            - 3
          type: button_group
          listable: hidden
          display: Padding

And then attempt to select the buttons in that button group, this fails.

Despite it working for other button groups in the yaml:

          options:
            - 25%
            - 33%
            - 50%
            - 75%
            - 100%

In order to fix this issue the user must modify the integers with quotes in the yaml:

        handle: image_padding
        field:
          options:
            - '0'
            - '1'
            - '2'
            - '3'
          type: button_group
          listable: hidden
          display: Padding

Environment

Statamic version: 3.0.2
PHP version: 7.4
Install method (choose one): Fresh install from statamic/statamic

@jonassiewertsen
Copy link
Contributor

There has been a similar issue with select fields. Not 100% sure if they are connected somehow, but it may be worth checking that out:
#1217

@jcohlmeyer
Copy link

Seems like it may be related to #2215 and #2066 as well.

@jasonvarga
Copy link
Member

Duplicate of #2215

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

4 participants