Compare commits

..

2 Commits
0.8.3 ... 0.8.4

Author SHA1 Message Date
Nicolas Gallagher
e7cb364b63 0.8.4 2018-06-14 13:40:57 -07:00
Nicolas Gallagher
90bd23f783 [fix] onLayout event object
Make sure that `this` within the `target` getter references the React
component rather than the layout event object.

Fix #996
2018-06-14 13:21:25 -07:00
8 changed files with 18 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
{
"private": true,
"version": "0.8.3",
"version": "0.8.4",
"name": "react-native-web-monorepo",
"scripts": {
"clean": "del ./packages/*/dist",

View File

@@ -1,6 +1,6 @@
{
"name": "babel-plugin-react-native-web",
"version": "0.8.3",
"version": "0.8.4",
"description": "Babel plugin for React Native for Web",
"main": "index.js",
"devDependencies": {

View File

@@ -1,7 +1,7 @@
{
"private": true,
"name": "benchmarks",
"version": "0.8.3",
"version": "0.8.4",
"scripts": {
"build": "mkdir -p dist && cp -f index.html dist/index.html && ./node_modules/.bin/webpack-cli --config ./webpack.config.js",
"release": "yarn build && git checkout gh-pages && rm -rf ../../benchmarks && mv dist ../../benchmarks && git add -A && git commit -m \"Benchmarks deploy\" && git push origin gh-pages && git checkout -"
@@ -18,7 +18,7 @@
"react-dom": "^16.3.2",
"react-fela": "^7.2.0",
"react-jss": "^8.4.0",
"react-native-web": "0.8.3",
"react-native-web": "0.8.4",
"reactxp": "^1.1.1",
"styled-components": "^3.2.6",
"styled-jsx": "^2.2.6",
@@ -26,7 +26,7 @@
"styletron-react": "^4.2.1"
},
"devDependencies": {
"babel-plugin-react-native-web": "0.8.3",
"babel-plugin-react-native-web": "0.8.4",
"css-loader": "^0.28.11",
"style-loader": "^0.21.0",
"url-loader": "^1.0.1",

View File

@@ -1,7 +1,7 @@
{
"private": true,
"name": "react-native-examples",
"version": "0.8.3",
"version": "0.8.4",
"scripts": {
"build": "mkdir -p dist && cp -f src/index.html dist/index.html && ./node_modules/.bin/webpack-cli --config ./webpack.config.js",
"release": "yarn build && git checkout gh-pages && rm -rf ../../examples && mv dist ../../examples && git add -A && git commit -m \"Examples deploy\" && git push origin gh-pages && git checkout -"
@@ -10,10 +10,10 @@
"babel-runtime": "^6.26.0",
"react": "^16.3.2",
"react-dom": "^16.3.2",
"react-native-web": "0.8.3"
"react-native-web": "0.8.4"
},
"devDependencies": {
"babel-plugin-react-native-web": "0.8.3",
"babel-plugin-react-native-web": "0.8.4",
"babel-plugin-transform-runtime": "^6.23.0",
"file-loader": "^1.1.11",
"webpack": "^4.8.1",

View File

@@ -1,6 +1,6 @@
{
"name": "react-native-web",
"version": "0.8.3",
"version": "0.8.4",
"description": "React Native for Web",
"module": "dist/index.js",
"main": "dist/cjs/index.js",

View File

@@ -183,6 +183,7 @@ class TextInput extends Component<*> {
blurOnSubmit,
clearTextOnFocus,
onChangeText,
onLayout,
onSelectionChange,
onSubmitEditing,
selection,

View File

@@ -131,11 +131,12 @@ const applyLayout = Component => {
) {
this._layoutState = { x, y, width, height };
const nativeEvent = {
layout: this._layoutState,
get target() {
return findNodeHandle(this);
}
layout: this._layoutState
};
Object.defineProperty(nativeEvent, 'target', {
enumerable: true,
get: () => findNodeHandle(this)
});
onLayout({ nativeEvent, timeStamp: Date.now() });
}
}

View File

@@ -1,7 +1,7 @@
{
"private": true,
"name": "website",
"version": "0.8.3",
"version": "0.8.4",
"scripts": {
"build": "build-storybook -o ./dist -c ./storybook/.storybook",
"start": "start-storybook -p 9001 -c ./storybook/.storybook",
@@ -12,10 +12,10 @@
"@storybook/react": "^3.4.3",
"react": "^16.3.2",
"react-dom": "^16.3.2",
"react-native-web": "0.8.3"
"react-native-web": "0.8.4"
},
"devDependencies": {
"babel-plugin-react-native-web": "0.8.3",
"babel-plugin-react-native-web": "0.8.4",
"url-loader": "^1.0.1",
"webpack": "^4.8.1"
}