Skip to content

Commit f9b730a

Browse files
committed
fixed typos
1 parent 42fd4fb commit f9b730a

File tree

7 files changed

+21
-14
lines changed

7 files changed

+21
-14
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@ React.renderComponent(
171171
<Table className="table" id="table">
172172
<Thead>
173173
<Th column="name">
174-
<strong class="name-header">First Name, Last Name</strong>
174+
<strong className="name-header">First Name, Last Name</strong>
175175
</Th>
176176
<Th column="age">
177-
<em class="age-header">Age, years</em>
177+
<em className="age-header">Age, years</em>
178178
</Th>
179179
</Thead>
180180
<Tr>

build/reactable.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -825,12 +825,14 @@ window.React["default"] = window.React;
825825

826826
_createClass(Paginator, [{
827827
key: 'handlePrevious',
828-
value: function handlePrevious() {
828+
value: function handlePrevious(e) {
829+
e.preventDefault();
829830
this.props.onPageChange(this.props.currentPage - 1);
830831
}
831832
}, {
832833
key: 'handleNext',
833834
value: function handleNext() {
835+
e.preventDefault();
834836
this.props.onPageChange(this.props.currentPage + 1);
835837
}
836838
}, {
@@ -1282,7 +1284,7 @@ window.React["default"] = window.React;
12821284
var firstChild = null;
12831285

12841286
if (this.props.children && this.props.children.length > 0 && this.props.children[0].type === _thead.Thead) {
1285-
fistChild = this.props.children[0];
1287+
firstChild = this.props.children[0];
12861288
} else if (typeof this.props.children !== 'undefined' && this.props.children.type === _thead.Thead) {
12871289
firstChild = this.props.children;
12881290
}
@@ -1423,17 +1425,17 @@ window.React["default"] = window.React;
14231425

14241426
(function (global, factory) {
14251427
if (typeof define === 'function' && define.amd) {
1426-
define(['exports', 'react', './reactable/table', './reactable/tr', './reactable/td', './reactable/tfoot', './reactable/thead', './reactable/sort', './reactable/unsafe'], factory);
1428+
define(['exports', 'react', './reactable/table', './reactable/tr', './reactable/td', './reactable/th', './reactable/tfoot', './reactable/thead', './reactable/sort', './reactable/unsafe'], factory);
14271429
} else if (typeof exports !== 'undefined') {
1428-
factory(exports, require('react'), require('./reactable/table'), require('./reactable/tr'), require('./reactable/td'), require('./reactable/tfoot'), require('./reactable/thead'), require('./reactable/sort'), require('./reactable/unsafe'));
1430+
factory(exports, require('react'), require('./reactable/table'), require('./reactable/tr'), require('./reactable/td'), require('./reactable/th'), require('./reactable/tfoot'), require('./reactable/thead'), require('./reactable/sort'), require('./reactable/unsafe'));
14291431
} else {
14301432
var mod = {
14311433
exports: {}
14321434
};
1433-
factory(mod.exports, global.React, global.table, global.tr, global.td, global.tfoot, global.thead, global.sort, global.unsafe);
1435+
factory(mod.exports, global.React, global.table, global.tr, global.td, global.th, global.tfoot, global.thead, global.sort, global.unsafe);
14341436
global.reactable = mod.exports;
14351437
}
1436-
})(this, function (exports, _react, _reactableTable, _reactableTr, _reactableTd, _reactableTfoot, _reactableThead, _reactableSort, _reactableUnsafe) {
1438+
})(this, function (exports, _react, _reactableTable, _reactableTr, _reactableTd, _reactableTh, _reactableTfoot, _reactableThead, _reactableSort, _reactableUnsafe) {
14371439
'use strict';
14381440

14391441
_react['default'].Children.children = function (children) {
@@ -1472,7 +1474,7 @@ window.React["default"] = window.React;
14721474
});
14731475
}
14741476

1475-
var Reactable = { Table: _reactableTable.Table, Tr: _reactableTr.Tr, Td: _reactableTd.Td, Tfoot: _reactableTfoot.Tfoot, Thead: _reactableThead.Thead, Sort: _reactableSort.Sort, unsafe: _reactableUnsafe.unsafe };
1477+
var Reactable = { Table: _reactableTable.Table, Tr: _reactableTr.Tr, Td: _reactableTd.Td, Th: _reactableTh.Th, Tfoot: _reactableTfoot.Tfoot, Thead: _reactableThead.Thead, Sort: _reactableSort.Sort, unsafe: _reactableUnsafe.unsafe };
14761478

14771479
exports['default'] = Reactable;
14781480

lib/reactable.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ var _reactableTr = require('./reactable/tr');
1616

1717
var _reactableTd = require('./reactable/td');
1818

19+
var _reactableTh = require('./reactable/th');
20+
1921
var _reactableTfoot = require('./reactable/tfoot');
2022

2123
var _reactableThead = require('./reactable/thead');
@@ -60,7 +62,7 @@ if (!Array.prototype.find) {
6062
});
6163
}
6264

63-
var Reactable = { Table: _reactableTable.Table, Tr: _reactableTr.Tr, Td: _reactableTd.Td, Tfoot: _reactableTfoot.Tfoot, Thead: _reactableThead.Thead, Sort: _reactableSort.Sort, unsafe: _reactableUnsafe.unsafe };
65+
var Reactable = { Table: _reactableTable.Table, Tr: _reactableTr.Tr, Td: _reactableTd.Td, Th: _reactableTh.Th, Tfoot: _reactableTfoot.Tfoot, Thead: _reactableThead.Thead, Sort: _reactableSort.Sort, unsafe: _reactableUnsafe.unsafe };
6466

6567
exports['default'] = Reactable;
6668

lib/reactable/paginator.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@ var Paginator = (function (_React$Component) {
3333

3434
_createClass(Paginator, [{
3535
key: 'handlePrevious',
36-
value: function handlePrevious() {
36+
value: function handlePrevious(e) {
37+
e.preventDefault();
3738
this.props.onPageChange(this.props.currentPage - 1);
3839
}
3940
}, {
4041
key: 'handleNext',
4142
value: function handleNext() {
43+
e.preventDefault();
4244
this.props.onPageChange(this.props.currentPage + 1);
4345
}
4446
}, {

lib/reactable/table.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ var Table = (function (_React$Component) {
347347
var firstChild = null;
348348

349349
if (this.props.children && this.props.children.length > 0 && this.props.children[0].type === _thead.Thead) {
350-
fistChild = this.props.children[0];
350+
firstChild = this.props.children[0];
351351
} else if (typeof this.props.children !== 'undefined' && this.props.children.type === _thead.Thead) {
352352
firstChild = this.props.children;
353353
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"license": "MIT",
1515
"homepage": "https://github.com/glittershark/reactable",
1616
"scripts": {
17-
"test": "./node_modules/grunt-cli/bin/grunt ci"
17+
"test": "./node_modules/grunt-cli/bin/grunt ci",
18+
"build": "./node_modules/grunt-cli/bin/grunt build"
1819
},
1920
"peerDependencies": {
2021
"react": "* || ^0.14.0-beta1"

src/reactable/table.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ export class Table extends React.Component {
310310
this.props.children.length > 0 &&
311311
this.props.children[0].type === Thead
312312
) {
313-
fistChild = this.props.children[0]
313+
firstChild = this.props.children[0]
314314
} else if (
315315
typeof this.props.children !== 'undefined' &&
316316
this.props.children.type === Thead

0 commit comments

Comments
 (0)