react-numeric-input
react-numeric-input copied to clipboard
render [Object object] in meta tag
Hi I use this package with redux-form where I as wrapping NumericInput into redux-form Field tag. And after render I found [Object object] in meta tag
version
react: 16.4.0
redux-form: 7.3.0
react-numeric-input: 2.2.3
used in form
<Field
name="price"
component={NumericInput}
required
strict
formatValue={(num) => num + ' €'}
min={0}
precision={2}
/>
atom component
const NumericInputField = ({ input: { onChange, value }, formatValue, ...props }) => {
const handleChange = (value) => {
onChange(value)
}
const val = isNumber(value) ? value : null
return (
<div className="input-wrapper">
<NumericInput
{...props}
value={val}
onChange={handleChange}
format={formatValue || undefined}
/>
</div>
)
}
and render output
<span
class="react-numeric-input"
style="position:relative;display:inline-block"
>
<input
meta="[object Object]"
required=""
style="padding-right:3ex;box-sizing:border-box;font-size:inherit;border:1px solid #ccc;border-radius:2px;padding-left:4px;display:block;-webkit-appearance:none;line-height:normal"
type="text"
value=""
/>
<b
style="position:absolute;right:2px;width:2.26ex;border-color:rgba(0,0,0,.1);border-style:solid;text-align:center;cursor:default;transition:all 0.1s;background:rgba(0,0,0,.1);box-shadow:-1px -1px 3px rgba(0,0,0,.1) inset,1px 1px 3px rgba(255,255,255,.7) inset;top:2px;bottom:50%;border-radius:2px 2px 0 0;border-width:1px 1px 0 1px"
>
<i
style="position:absolute;top:50%;left:50%;width:0;height:0;border-width:0 0.6ex 0.6ex 0.6ex;border-color:transparent transparent rgba(0, 0, 0, 0.7);border-style:solid;margin:-0.3ex 0 0 -0.56ex"
/>
</b>
<b
style="position:absolute;right:2px;width:2.26ex;border-color:rgba(0,0,0,.1);border-style:solid;text-align:center;cursor:default;transition:all 0.1s;background:rgba(0,0,0,.1);box-shadow:-1px -1px 3px rgba(0,0,0,.1) inset,1px 1px 3px rgba(255,255,255,.7) inset;top:50%;bottom:2px;border-radius:0 0 2px 2px;border-width:0 1px 1px 1px"
>
<i
style="position:absolute;top:50%;left:50%;width:0;height:0;border-width:0.6ex 0.6ex 0 0.6ex;border-color:rgba(0, 0, 0, 0.7) transparent transparent;border-style:solid;margin:-0.3ex 0 0 -0.56ex"
/>
</b>
</span>
Is this a bug ?