Skip to content

Commit

Permalink
change the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Jones Warren committed Jul 25, 2019
1 parent 8a28990 commit 43cc155
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ $ npm install --save react-more-load
# how to use
```
import ReactLoadMore from "react-more-load";
const NoResult = ()=> <span>No more Result,~~</span>;
const Footer = ()=> <span>loading....~~</span>;
<ReactLoadMore
onBottom={this.loadMore.bind(this)}
fetching={fetching}
Expand Down
2 changes: 1 addition & 1 deletion dist/reactLoadMore.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ var ReactLoadMore = function (_React$Component) {
_react2.default.createElement(
"div",
{ style: { display: hasMore ? "block" : "none" }, id: "bottom" },
Footer ? { Footer: Footer } : _react2.default.createElement(
Footer ? _react2.default.createElement(Footer, null) : _react2.default.createElement(
"div",
{ className: "list-loader" },
_react2.default.createElement("div", { id: "foot_loader" })
Expand Down
2 changes: 1 addition & 1 deletion example/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class App extends React.Component {
fetching={fetching}
hasMore={hasMore}
NoResult={NoResult}
Footer={null}
Footer={()=><div>loading ...</div>}
>
{dataList.map((item,index) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-more-load",
"version": "1.0.4",
"version": "1.0.6",
"description": "a load more list component base on React",
"main": "dist/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/reactLoadMore.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default class ReactLoadMore extends React.Component {
<div style={{ clear: "both" }}> </div>
<div style={{ display: hasMore ? "block" : "none" }} id='bottom'>
{Footer ? (
{ Footer }
<Footer/>
) : (
<div className={"list-loader"}>
<div id={"foot_loader"} />
Expand Down

0 comments on commit 43cc155

Please sign in to comment.