Commit f81d36c6 authored by chencheng's avatar chencheng

7. Handle loading state

parent 2c763479
......@@ -3,7 +3,7 @@ import { Table, Pagination, Popconfirm } from 'antd';
import styles from './Users.css';
import { PAGE_SIZE } from '../constants';
function Users({ list: dataSource, total, page: current }) {
function Users({ list: dataSource, loading, total, page: current }) {
function deleteHandler(id) {
console.warn(`TODO: ${id}`);
}
......@@ -43,6 +43,7 @@ function Users({ list: dataSource, total, page: current }) {
<div className={styles.normal}>
<div>
<Table
loading={loading}
columns={columns}
dataSource={dataSource}
rowKey={record => record.id}
......@@ -65,6 +66,7 @@ function mapStateToProps(state) {
list,
total,
page,
loading: state.loading.models.users,
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment