MCPcopy Create free account
hub / github.com/sshwsfc/xadmin / return

Function return

packages/xadmin-model/src/render.js:32–38  ·  view source on GitHub ↗
({ value, wrap: WrapComponent })

Source from the content-addressed store, hash-verified

30 }
31 } else if((schema.type == 'number' || schema.type == 'integer') && schema.enum && schema.enum_title) {
32 return ({ value, wrap: WrapComponent }) => {
33 let result = null
34 let index = schema.enum.indexOf(value)
35 if(_.isArray(schema.enum_title) && index > -1) {
36 result = schema.enum_title[index]
37 }
38 return <WrapComponent>{result || value}</WrapComponent>
39 }
40 } else if(schema.type == 'boolean') {
41 return ({ value, wrap: WrapComponent }) => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected