Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random little fixes #27

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Examples/UIExplorer/LayoutExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ var LayoutExample = React.createClass({
</UIExplorerBlock>
<UIExplorerBlock title="Flex Wrap">
<CircleBlock style={{flexWrap: 'wrap'}}>
{'oooooooooooooooo'.split('').map(() => <Circle />)}
{'oooooooooooooooo'.split('').map((char, i) => <Circle key={i} />)}
</CircleBlock>
</UIExplorerBlock>
</UIExplorerPage>
Expand Down
2 changes: 1 addition & 1 deletion Examples/UIExplorer/ScrollViewExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var Thumb = React.createClass({

var THUMBS = ['https://fbcdn-dragon-a.akamaihd.net/hphotos-ak-ash3/t39.1997/p128x128/851549_767334479959628_274486868_n.png', 'https://fbcdn-dragon-a.akamaihd.net/hphotos-ak-prn1/t39.1997/p128x128/851561_767334496626293_1958532586_n.png', 'https://fbcdn-dragon-a.akamaihd.net/hphotos-ak-ash3/t39.1997/p128x128/851579_767334503292959_179092627_n.png', 'https://fbcdn-dragon-a.akamaihd.net/hphotos-ak-prn1/t39.1997/p128x128/851589_767334513292958_1747022277_n.png', 'https://fbcdn-dragon-a.akamaihd.net/hphotos-ak-prn1/t39.1997/p128x128/851563_767334559959620_1193692107_n.png', 'https://fbcdn-dragon-a.akamaihd.net/hphotos-ak-prn1/t39.1997/p128x128/851593_767334566626286_1953955109_n.png', 'https://fbcdn-dragon-a.akamaihd.net/hphotos-ak-prn1/t39.1997/p128x128/851591_767334523292957_797560749_n.png', 'https://fbcdn-dragon-a.akamaihd.net/hphotos-ak-prn1/t39.1997/p128x128/851567_767334529959623_843148472_n.png', 'https://fbcdn-dragon-a.akamaihd.net/hphotos-ak-prn1/t39.1997/p128x128/851548_767334489959627_794462220_n.png', 'https://fbcdn-dragon-a.akamaihd.net/hphotos-ak-prn1/t39.1997/p128x128/851575_767334539959622_441598241_n.png', 'https://fbcdn-dragon-a.akamaihd.net/hphotos-ak-ash3/t39.1997/p128x128/851573_767334549959621_534583464_n.png', 'https://fbcdn-dragon-a.akamaihd.net/hphotos-ak-prn1/t39.1997/p128x128/851583_767334573292952_1519550680_n.png'];
THUMBS = THUMBS.concat(THUMBS); // double length of THUMBS
var createThumbRow = (uri, i) => <Thumb uri={uri}/>;
var createThumbRow = (uri, i) => <Thumb key={i} uri={uri}/>;

var styles = StyleSheet.create({
scrollView: {
Expand Down
4 changes: 2 additions & 2 deletions Examples/UIExplorer/UIExplorerList.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ var UIExplorerList = React.createClass({
);
},

_renderRow: function(example) {
_renderRow: function(example, i) {
invariant(example.title, 'Example must provide a title.');
return (
<View>
<View key={i}>
<TouchableHighlight onPress={() => this._onPressRow(example)}>
<View style={styles.row}>
<Text style={styles.rowTitleText}>
Expand Down
3 changes: 2 additions & 1 deletion Examples/UIExplorer/createExamplePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var createExamplePage = function(title, exampleModule) {
description: exampleModule.description,
},

getBlock: function(example) {
getBlock: function(example, i) {
// Hack warning: This is a hack because the www UI explorer requires
// renderComponent to be called.
var originalRenderComponent = React.renderComponent;
Expand All @@ -37,6 +37,7 @@ var createExamplePage = function(title, exampleModule) {
React.render = originalRender;
return (
<UIExplorerBlock
key={i}
title={example.title}
description={example.description}>
{renderedComponent}
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Components/ListView/ListView.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ var ListView = React.createClass({
initialListSize: PropTypes.number,
/**
* Called when all rows have been rendered and the list has been scrolled
* to within onEndReachedThreashold of the bottom. The native scroll
* to within onEndReachedThreshold of the bottom. The native scroll
* event is provided.
*/
onEndReached: PropTypes.func,
Expand Down