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

Broken UI with Array Fieldtype #2858

Closed
aerni opened this issue Nov 18, 2020 · 9 comments · Fixed by #3260
Closed

Broken UI with Array Fieldtype #2858

aerni opened this issue Nov 18, 2020 · 9 comments · Fixed by #3260
Labels

Comments

@aerni
Copy link
Contributor

aerni commented Nov 18, 2020

Bug Description

The UI of the Array Fieldtype breaks in mode:keyed when you don't provide labels to the keys.

How to Reproduce

Use this blueprint to reproduce:

sections:
  address:
    display: Address
    fields:
      -
        handle: address
        field:
          mode: keyed
          keys:
            company: Company
            street: 'Street + Nr.'
            zip: 'ZIP Code'
            city: City
            country: Country
          display: Address
          type: array
          icon: array
          instructions: 'The address of your company'
          listable: hidden
          validate:
            - required
      -
        handle: contact
        field:
          mode: keyed
          keys:
            email: null
            phone: null
          display: Contact
          type: array
          icon: array
          instructions: 'The contact information of your company'
          listable: hidden
          validate:
            - required

Extra Detail

Bildschirmfoto 2020-11-18 um 14 30 06

Environment

Statamic 3.0.28 Pro
Laravel 8.15.0
PHP 7.4.12
aerni/social-links 2.1.0
aerni/zipper 1.2.0
jonassiewertsen/statamic-livewire 2.1.2
spatie/statamic-responsive-images 1.4.0
visuellverstehen/statamic-classify 2.0.0

@duncanmcclean
Copy link
Member

duncanmcclean commented Nov 19, 2020

I can confirm this issue, thanks for the YAML btw. Is there any reason why you're not providing labels for email and phone?

@aerni
Copy link
Contributor Author

aerni commented Nov 19, 2020

Nope. Just ran to into this by accident. I'm fine having to provide labels. But then the blueprint builder should require the labels.

@duncanmcclean
Copy link
Member

Yeah, that's probably the best solution (to require them in the blueprint builder)

@github-actions
Copy link

This issue has not had recent activity and has been marked as stale — by me, a robot. Simply reply to keep it open and send me away. If you do nothing, I will close it in a week. I have no feelings, so whatever you do is fine by me.

@github-actions github-actions bot added the stale label Jan 20, 2021
@aerni
Copy link
Contributor Author

aerni commented Jan 20, 2021

Still an issue.

@github-actions github-actions bot removed the stale label Jan 21, 2021
@mikemartin
Copy link

Definitely still an issue.

@mikemartin
Copy link

@aerni I'm experiencing a similar issue when using the Array Fieldtype inside a grid.

Screen Shot 2021-02-02 at 11 15 25 am

-
    handle: hero_buttons
    field:
      type: grid
      display: 'Hero Button'
      fields:
        -
          handle: hero_button
          field:
            type: array
            display: Button
            keys:
              label: Label
              link: Link
            listable: hidden
            mode: keyed
      max_rows: 2
      add_row: 'Add Button'
      listable: hidden
      mode: table
      reorderable: true

@jesseleite
Copy link
Member

@mikemartin To your example there, fields within grids were fixed by #3235 🎉

@mikemartin
Copy link

Thanks mate!

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

Successfully merging a pull request may close this issue.

4 participants