@mihanizm56/react-final-form-utils
Advanced tools
Comparing version 0.0.3-beta.1 to 0.0.3-beta.2
import React from 'react'; | ||
import { Field } from 'react-final-form'; | ||
import { isValueSelected } from './utils/is-value-selected'; | ||
export var ConditionField = function (_a) { | ||
@@ -7,4 +8,5 @@ var when = _a.when, is = _a.is, children = _a.children; | ||
var value = _a.input.value; | ||
return (value === is ? children : null); | ||
var isSelected = isValueSelected({ value: value, is: is }); | ||
return isSelected ? children : null; | ||
})); | ||
}; |
{ | ||
"name": "@mihanizm56/react-final-form-utils", | ||
"version": "0.0.3-beta.1", | ||
"version": "0.0.3-beta.2", | ||
"description": "form utils module", | ||
@@ -79,2 +79,2 @@ "main": "dist/index.js", | ||
} | ||
} | ||
} |
6854
11
66