Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
soyjavi committed Nov 4, 2015
1 parent 806e484 commit d7c5dbe
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions components/table/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ const UserModel = {
};

const users = [
{name: 'Javi Jimenez', twitter: '@soyjavi', birthdate: Date(1980, 4, 10), cats: 1}
{name: 'Javi Jimenez', twitter: '@soyjavi', birthdate: new Date(1980, 3, 11), cats: 1}
,
{name: 'Javi Velasco', twitter: '@javivelasco', birthdate: Date(1987, 4, 10), dogs: 1, active: true}
{name: 'Javi Velasco', twitter: '@javivelasco', birthdate: new Date(1987, 1, 1), dogs: 1, active: true}
];

const TableTest = () => (
Expand Down
44 changes: 22 additions & 22 deletions spec/components/table.jsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
import React from 'react';
import Table from '../../components/table';

class TableTest extends React.Component {
const UserModel = {
name: {type: String}
,
twitter: {type: String}
,
birthdate: {type: Date}
,
cats: {type: Number}
,
dogs: {type: Number}
,
active: {type: Boolean}
};

state = {
model: {
name: {type: String, required: true}
,
twitter: {type: String, required: true}
,
birthdate: {type: Date}
,
cats: {type: Number}
,
active: {type: Boolean}
},
const users = [
{name: 'Javi Jimenez', twitter: '@soyjavi', birthdate: new Date(1980, 3, 11), cats: 1}
,
{name: 'Javi Velasco', twitter: '@javivelasco', birthdate: new Date(1987, 1, 1), dogs: 1, active: true}
];

dataSource: [
{name: 'Javi Jimenez', twitter: '@soyjavi', birthdate: Date(1980, 4, 10), cats: 1}
,
{name: 'Javi Velasco', twitter: '@javivelasco', birthdate: Date(1987, 4, 10), active: true}
]
};
class TableTest extends React.Component {

handleTableChange = (event, instance, row) => {
console.log('handleTableChange', instance.getValue(), row);
Expand All @@ -35,10 +35,10 @@ class TableTest extends React.Component {
return (
<section>
<h5>Table</h5>
<p style={{marginBottom: '10px'}}>Table who doesn't suck...</p>
<p style={{marginBottom: '10px'}}>Organized data.</p>
<Table
model={this.state.model}
dataSource={this.state.dataSource}
model={UserModel}
dataSource={users}
onChange={this.handleTableChange}
onSelect={this.handleTableSelect}
/>
Expand Down

0 comments on commit d7c5dbe

Please sign in to comment.