1

I am just trying to define NameValueList in one of my JSS component. Looks like there are only defined set of fields available in CommonFieldTypes [@sitecore-jss/sitecore-jss-manifest]. Is there a way to define List Types [Name Value List] in JSS definition file and use in JSS Component. ?

1

From the docs:

For custom Sitecore field types or other types not in the CommonFieldTypes enumeration, the string of their field type name in Sitecore (i.e. Single-Line Text) can be passed. Editors that support type annotations, like VS Code, will provide auto-completion on this enum.

  • I just tried in VS code, when i type NameValueList, it's not recognizing or auto completing.. Let me try to type the entire name and test the code.. – Gobinath Saminathan Mar 25 at 19:30
  • 1
    @Gobinath, to use field types that are not defined in the CommonFieldTypes enum, you need to use the field type name as defined in Sitecore. For name value list field, the name is "Name Value List" in Sitecore. – Adam Weber Mar 26 at 15:53
  • @AdamWeber it works.. – Gobinath Saminathan Mar 28 at 19:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.