davidfateh / repeater-app

The Repeater App creates a repeatable list of key-value pairs.
MIT License
30 stars 22 forks source link

Widget ID for the repeater app #3

Closed Raymond-Ly closed 2 years ago

Raymond-Ly commented 3 years ago

Hello,

I am trying to create a migration to configure the view of a json object to this app, however, i can't seem to find the widget ID for this?

Tried: repeater repeater-app repeaterApp

  ComponentContentModel
    .changeFieldControl(
      'anchorLinks',
      'extension',
      'repeater'
    )
Sunac commented 2 years ago

You probably don't need it anymore, but for future reference, I'll put our hack.
Since the ID of the app is not visible from a Contentful UI, we changed the appearance of one object field in development to use the Repeater app, then used the CLI - export command to export the content models only, and there it was clearly visible for that field the ID of the app which is used then to create a new field we need and change appearance via migration script. "widgetId": "XXXXXXXXXXX", "widgetNamespace": "app"

So we used it in our migration script for a creation of all new fields that could be associated with the Repeater app: FIELD.changeFieldControl( 'fieldId', 'app', 'app-widgetIdXXXXXXXXXXX', { helpText: 'something' });

Raymond-Ly commented 2 years ago

Thanks :)