({ value, wrap: WrapComponent })
| 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 }) => { |
nothing calls this directly
no outgoing calls
no test coverage detected