Skip to content
This repository was archived by the owner on Feb 16, 2021. It is now read-only.

Number type input field not handling input correctly #415

Open
niteshgrg opened this issue May 22, 2018 · 0 comments
Open

Number type input field not handling input correctly #415

niteshgrg opened this issue May 22, 2018 · 0 comments

Comments

@niteshgrg
Copy link

Version

Tell us which versions you are using:

  • tcomb-form v0.9.19
  • react v16.3.1

Expected behaviour

I am creating a template for field with type number. So now onChange should supply the value in numerical form as mentioned in docs

import React from 'react';

export function TextInputTemplate(locals) {
function onChange($event) {
locals.onChange($event.target.value);
}
return (




);
}

Actual behaviour

Instead it supplies even the entered number as string as i would enter 2 here and onChange would get "2" as value

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant