Updates from Thu Mar 12

- Fixed sticky section headers in ListView | Nick Lockwood
- [ReactNative] AppState cleanup, remove Subscribable, add in OSS examples | Eric Vicenti
- [react-packager] package.json cleanup (seperate packager into it's own package) | Amjad Masad
- [ReactNative] Move PushNotificationIOS to oss | Tadeu Zagallo
- [ReactNative] Fix shake gesture after RedBox is dismissed | Alex Kotliarskyi
- [catlyst|madman] fix prop type warning | Jiajie Zhu
- [ReactNative] Remove Subscribable from TextInput | Eric Vicenti
- Unforked ExceptionsManager, AlertManager and AppState | Nick Lockwood
- [ReactNative|MAdMan] Notification Subscribable | Eric Vicenti
- [ReactNative] OSS AsyncStorage with example | Spencer Ahrens
This commit is contained in:
Christopher Chedeau
2015-03-12 12:51:44 -07:00
parent 9f37aea739
commit 642c13e3e3
36 changed files with 1329 additions and 51 deletions

View File

@@ -401,8 +401,8 @@ var ListView = React.createClass({
var header = this.props.renderHeader && this.props.renderHeader();
var totalIndex = header ? 1 : 0;
var visibilityChanged = false;
var changedRows = {};
for (var sectionIdx = 0; sectionIdx < allRowIDs.length; sectionIdx++) {
var changedRows = {};
for (var sectionIdx = 0; sectionIdx < allRowIDs.length; sectionIdx++) {
var rowIDs = allRowIDs[sectionIdx];
if (rowIDs.length === 0) {
continue;

View File

@@ -310,8 +310,8 @@ var validAttributes = {
alwaysBounceVertical: true,
automaticallyAdjustContentInsets: true,
centerContent: true,
contentInset: insetsDiffer,
contentOffset: pointsDiffer,
contentInset: {diff: insetsDiffer},
contentOffset: {diff: pointsDiffer},
decelerationRate: true,
horizontal: true,
keyboardDismissMode: true,
@@ -321,11 +321,11 @@ var validAttributes = {
pagingEnabled: true,
removeClippedSubviews: true,
scrollEnabled: true,
scrollIndicatorInsets: insetsDiffer,
scrollIndicatorInsets: {diff: insetsDiffer},
scrollsToTop: true,
showsHorizontalScrollIndicator: true,
showsVerticalScrollIndicator: true,
stickyHeaderIndices: deepDiffer,
stickyHeaderIndices: {diff: deepDiffer},
throttleScrollCallbackMS: true,
zoomScale: true,
};

View File

@@ -14,7 +14,6 @@ var React = require('React');
var ReactChildren = require('ReactChildren');
var ReactIOSViewAttributes = require('ReactIOSViewAttributes');
var StyleSheet = require('StyleSheet');
var Subscribable = require('Subscribable');
var Text = require('Text');
var TextInputState = require('TextInputState');
var TimerMixin = require('TimerMixin');
@@ -195,7 +194,7 @@ var TextInput = React.createClass({
* `NativeMethodsMixin` will look for this when invoking `setNativeProps`. We
* make `this` look like an actual native component class.
*/
mixins: [NativeMethodsMixin, TimerMixin, Subscribable.Mixin],
mixins: [NativeMethodsMixin, TimerMixin],
viewConfig: {
uiViewClassName: 'RCTTextField',
@@ -232,18 +231,25 @@ var TextInput = React.createClass({
}
return;
}
this.addListenerOn(this.context.focusEmitter, 'focus', (el) => {
if (this === el) {
this.requestAnimationFrame(this.focus);
} else if (this.isFocused()) {
this.blur();
this._focusSubscription = this.context.focusEmitter.addListener(
'focus',
(el) => {
if (this === el) {
this.requestAnimationFrame(this.focus);
} else if (this.isFocused()) {
this.blur();
}
}
});
);
if (this.props.autoFocus) {
this.context.onFocusRequested(this);
}
},
componentWillUnmount: function() {
this._focusSubscription && this._focusSubscription.remove();
},
componentWillReceiveProps: function(newProps) {
if (newProps.value !== this.props.value) {
if (!this.isFocused()) {