Git Product home page Git Product logo

tcomb-form-injector's People

Contributors

saidmoya12 avatar smoya-ekoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tcomb-form-injector's Issues

React Native Support

Does this support React Native?

Cant seem to get it tow work with tcomb native

IE-10 error due to class properties transformation - add babel plugin es2015

Hi,
Thanks for the wonderful addon to tcomb.
Out of the box works in Chrome and FF (when installed via npm), however fails in IE-10 with error
SCRIPT5007: Unable to get property 'hasError' of undefined or null reference: in Injector.js:148
By installing this plugin and adding an entry to .babelrc file resolved the issue.

babel-plugin-transform-es2015-classes

{
  "presets": ["react", "es2015", "stage-0"],
  "plugins": [
      "transform-class-properties",
       ["transform-es2015-classes", {
          "loose": true
        }]
  ]
}

Could you please add these and publish/release the latest to NPM as well?
I can do a PR if that helps, please let me know.

Thanks,
Rajesh

Injected components lose focus on input (onChange) - fix is not to update props.key on re-render

Injected components lose focus on input (onChange) due to unique key of element each time it renders.

Fix: Use any unique but consistent key rather than random number.

Change this line in getInjectedElement() function of Injector.js
props.key = Math.floor((Math.random() * 100) + 1);
to
props.key = this.props.key ? this.props.key : this.props.name; (assuming name of component would always be unique)

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.