Skip to content

Commit 55ed9f2

Browse files
potik1mysiar
authored andcommitted
React native (#87)
* template fix * test fix * templates update * working but still in progress * list fixed * list fixed * finished * dependencies update * remove referenced field from Show component * bug fixes
1 parent fd225fe commit 55ed9f2

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

templates/react-native/components/foo/Form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class Form extends Component {
4848
title='SAVE'
4949
onPress={handleSubmit(mySubmit)}
5050
/>
51-
</View>;
51+
</View>
5252
);
5353
}
5454
}

templates/react-native/components/foo/List.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class ListComponent extends Component {
6060
return <View style={ {flex: 1} }>
6161
<Text style={styles.textStyle}>{this.props.error}</Text>
6262
</View>;
63+
}
6364

6465
return (
6566
<View style={ {flex: 1} }>

templates/react-native/components/foo/Show.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class Show extends Component {
5353
key={value}
5454
hideChevron={true}
5555
title={title}
56-
subtitle={value}
56+
subtitle={Array.isArray(value) ? value.length.toString() : value}
5757
subtitleNumberOfLines={100}
5858
/>
5959
);
@@ -99,8 +99,10 @@ class Show extends Component {
9999
{item &&
100100
<Card title="{{{title}}}">
101101
<List title="title">
102-
{{#each formFields}}
102+
{{#each fields}}
103+
{{#ifNotResource reference }}
103104
{Show.renderRow('{{{ name }}}', item['{{{ name }}}'])}
105+
{{/ifNotResource}}
104106
{{/each}}
105107
</List>
106108
</Card>

templates/react-native/components/foo/Update.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const styles = {
9898

9999
Update.propTypes = {
100100
retrieveError: PropTypes.string,
101-
retrieveLoading: PropTypes.{{{lc}}}.isRequired,
101+
retrieveLoading: PropTypes.bool.isRequired,
102102
updateError: PropTypes.string,
103103
updateLoading: PropTypes.bool.isRequired,
104104
retrieved: PropTypes.object,

0 commit comments

Comments
 (0)