wvi-test-ui-components
Advanced tools
Comparing version
{ | ||
"name": "wvi-test-ui-components", | ||
"version": "0.0.14998188", | ||
"version": "0.0.14998189", | ||
"description": "React component library for WVI", | ||
@@ -5,0 +5,0 @@ "main": "src/dist/ui.js", |
@@ -17,13 +17,13 @@ import React from 'react'; | ||
const isExistingValue = data[occurrenceKey].options.filter(option => option.value === parseInt(props.value)); | ||
// | ||
// // Map default values on first mount. (Default value is integer) | ||
// const value = (data[occurrenceKey].defaultValue) && | ||
// (data[occurrenceKey].defaultValue > 0 && | ||
// props.value === undefined || // First mount | ||
// !isExistingValue.length // Value is not related to these occurrence group options. | ||
// ) ? | ||
// data[occurrenceKey].defaultValue : props.value; | ||
// Map default values on first mount. (Default value is integer) | ||
const value = (data[occurrenceKey].defaultValue) && | ||
(data[occurrenceKey].defaultValue > 0 && | ||
props.value === undefined || // First mount | ||
!isExistingValue.length // Value is not related to these occurrence group options. | ||
) ? | ||
data[occurrenceKey].defaultValue : props.value; | ||
// console.log('dollar handles', occurrenceKey, props); | ||
console.log('dollar handles', occurrenceKey, props); | ||
return data[occurrenceKey].options.map((option) => { | ||
@@ -47,3 +47,3 @@ // Create a RadioOption component that will render a <div> element with styles. | ||
${parseInt(value) === option.value && ` | ||
${parseInt(props.value) === option.value && ` | ||
border-color: ${globalStyles.colors.wvColor}; | ||
@@ -50,0 +50,0 @@ background: ${globalStyles.colors.wvColor}; |
@@ -13,6 +13,6 @@ import React from 'react'; | ||
// Map default value on first mount. | ||
const value = (props.settings.defaultValue) && | ||
(props.settings.defaultValue.length > 0 && props.value === undefined) ? | ||
props.settings.defaultValue : props.value; | ||
// // Map default value on first mount. | ||
// const value = (props.settings.defaultValue) && | ||
// (props.settings.defaultValue.length > 0 && props.value === undefined) ? | ||
// props.settings.defaultValue : props.value; | ||
@@ -73,3 +73,3 @@ return data.map((option) => { | ||
${value === option.value && ` | ||
${props.value === option.value && ` | ||
border-color: ${globalStyles.colors.wvColor}; | ||
@@ -76,0 +76,0 @@ background: ${globalStyles.colors.wvColor}; |
@@ -38,3 +38,3 @@ import React from 'react'; | ||
onChange={props.handleChange} | ||
value={value} | ||
value={props.value} | ||
disabled={props.settings.disabled && 'disabled'} | ||
@@ -41,0 +41,0 @@ > |
Sorry, the diff of this file is too big to display
5360
0.02%6036205
0