Closed mingard closed 4 years ago
Use this example field:
"vendor": { "type": "String", "label": "Payment Vendor", "required": false, "validation": { "regex": { "pattern": "[paypal|stripe]" } }, "publish": { "multiple": false, "section": "Payment", "placement": "sidebar", "display": { "list": true, "edit": true }, "options": [ { "value": "paypal", "label": "Paypal" }, { "value": "stripe", "label": "Stripe" } ] } } }
[object]
I presume that what it's doing is selecting the object from the list of options, but rendering the option rather than option.label
option
option.label
The logic is here https://github.com/dadi/publish/blob/develop/app/components/FieldString/FieldStringList.jsx#L79-L97
Use this example field:
[object]
rather than "stripe" or "paypal"I presume that what it's doing is selecting the object from the list of options, but rendering the
option
rather thanoption.label
The logic is here https://github.com/dadi/publish/blob/develop/app/components/FieldString/FieldStringList.jsx#L79-L97