MCPcopy Create free account
hub / github.com/decaporg/decap-cms / convertToOption

Function convertToOption

packages/decap-cms-widget-select/src/SelectControl.js:16–21  ·  view source on GitHub ↗
(raw)

Source from the content-addressed store, hash-verified

14}
15
16function convertToOption(raw) {
17 if (typeof raw === 'string') {
18 return { label: raw, value: raw };
19 }
20 return Map.isMap(raw) ? raw.toJS() : raw;
21}
22
23function getSelectedValue({ value, options, isMultiple }) {
24 if (isMultiple) {

Callers 1

RelationControl.jsFile · 0.85

Calls 1

toJSMethod · 0.80

Tested by

no test coverage detected