Skip to content

nameFrom can’t use selector fields #324

@Daaaaad

Description

@Daaaaad

Description

When a repeater uses a selector field as its nameFrom source, the row label shown in the back-office sidebar is JSON data.

'repeater' => [
  'name'     => 'Selected products',
  'nameFrom' => 'product',            // <— selector field
  'groups'   => [
    'product' => [
      'type'       => 'selector',
      'collection' => 'Product',
      'selector'   => '{id} - {name}',
    ],
  ],
],

Steps to reproduce

  1. Create a custom block with the configuration above.
  2. In the BO page builder, add an item and pick a product via the selector.
  3. Look at the repeater tree: the new row shows JSON data instead of the product label.

Expected behavior

The row title should display the formatted string defined by the selector field
(e.g. 7 – Smoked Ardennes Ham).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions