Skip to content

Commit ab486e8

Browse files
authored
React native: display the id (#106)
* #fix-93: List component id included * #fix-93: Show component id included
1 parent 89a98c1 commit ab486e8

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ class ListComponent extends Component {
3939
onPressRightIcon={() => ListComponent.show(item['@id'])}
4040
subtitle={
4141
<View>
42+
<View style={viewList}>
43+
<Text style={listRowLeft}>id</Text>
44+
<Text style={[listRowRight, {fontWeight: 'bold'}]}>{item['@id']}</Text>
45+
</View>
4246
{{#each fields}}
4347
{{#ifNotResource reference }}
4448
<View style={viewList}>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ class Show extends Component {
9999
{item &&
100100
<Card title="{{{title}}}">
101101
<List title="title">
102+
{Show.renderRow('id', item['@id'])}
102103
{{#each fields}}
103104
{{#ifNotResource reference }}
104105
{Show.renderRow('{{{name}}}', item['{{{name}}}'])}

0 commit comments

Comments
 (0)