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

Example of CustomCell #17

Closed
kirillplatonov opened this issue Oct 4, 2015 · 3 comments
Closed

Example of CustomCell #17

kirillplatonov opened this issue Oct 4, 2015 · 3 comments

Comments

@kirillplatonov
Copy link

Hi guys. Amazing job!

Could you please add example of creating and using custom cell to readme?

@kirillplatonov
Copy link
Author

I tried to follow this example https://github.com/aksonov/react-native-tableview/blob/master/examples/TableViewDemo/index.ios.js
But when I add custom cell to my table view I receive this errors in console: https://www.dropbox.com/s/bunsgugrhwi1kni/Screenshot%202015-10-04%2010.58.28.png?dl=0

My code:

'use strict';

var React = require('react-native');
var {
  StyleSheet,
  Text,
  View,
  TouchableHighlight,
  TextInput,
  ScrollView,
} = React;
var TableView = require('react-native-tableview');
var Section = TableView.Section;
var Item = TableView.Item;
var Cell = TableView.Cell;

var indexScene = React.createClass({
  render: function() {
    return (
        <TableView
          style={s.table}
          tableViewStyle={TableView.Consts.Style.Grouped}
          tableViewCellStyle={TableView.Consts.CellStyle.Value1}
          onPress={(event) => console.log(event)}>
          <Section arrow={true}>
            <Cell><Text>Cell 3</Text></Cell>
          </Section>
        </TableView>
    );
  }
});

var s = StyleSheet.create({
  table: {
    flex: 1,
  },
});

module.exports = indexScene;

Maybe someone has similar problem and know how to fix this?

@kirillplatonov
Copy link
Author

I tried version 1.2.4 and it working there properly. So problem caused by this commit a701d84

@aksonov
Copy link
Owner

aksonov commented Oct 5, 2015

Should be fixed with 1.3.1

@aksonov aksonov closed this as completed Oct 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants