tcomb-form-injector's People
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.