File tree Expand file tree Collapse file tree 4 files changed +17
-22
lines changed
x-pack/plugins/rollup/public/crud_app
sections/job_list/job_table Expand file tree Collapse file tree 4 files changed +17
-22
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,16 @@ const COLUMNS = [{
110110export class JobTableUi extends Component {
111111 static propTypes = {
112112 jobs : PropTypes . array ,
113+ pager : PropTypes . object . isRequired ,
114+ filter : PropTypes . string . isRequired ,
115+ sortField : PropTypes . string . isRequired ,
116+ isSortAscending : PropTypes . bool . isRequired ,
113117 closeDetailPanel : PropTypes . func . isRequired ,
118+ filterChanged : PropTypes . func . isRequired ,
119+ pageChanged : PropTypes . func . isRequired ,
120+ pageSizeChanged : PropTypes . func . isRequired ,
121+ sortChanged : PropTypes . func . isRequired ,
122+ dispatch : PropTypes . func . isRequired ,
114123 }
115124
116125 static defaultProps = {
Original file line number Diff line number Diff line change @@ -23,8 +23,6 @@ export const CLEAR_CREATE_JOB_ERRORS = 'CLEAR_CREATE_JOB_ERRORS';
2323export const DELETE_JOBS_SUCCESS = 'DELETE_JOBS_SUCCESS' ;
2424
2525// Table state
26- export const APPLY_FILTERS = 'APPLY_FILTERS' ;
27- export const FILTERS_APPLIED = 'FILTERS_APPLIED' ;
2826export const FILTER_CHANGED = 'FILTER_CHANGED' ;
2927export const PAGE_CHANGED = 'PAGE_CHANGED' ;
3028export const PAGE_SIZE_CHANGED = 'PAGE_SIZE_CHANGED' ;
Original file line number Diff line number Diff line change @@ -28,8 +28,6 @@ export {
2828} from './detail_panel' ;
2929
3030export {
31- applyFilters ,
32- filtersApplied ,
3331 filterChanged ,
3432 pageChanged ,
3533 pageSizeChanged ,
Original file line number Diff line number Diff line change 55 */
66
77import {
8- APPLY_FILTERS ,
9- FILTERS_APPLIED ,
108 FILTER_CHANGED ,
119 PAGE_CHANGED ,
1210 PAGE_SIZE_CHANGED ,
1311 SORT_CHANGED ,
1412} from '../action_types' ;
1513
16- export const applyFilters = ( ) => ( dispatch ) => {
17- dispatch ( {
18- type : APPLY_FILTERS ,
19- } ) ;
20- } ;
21-
22- export const filtersApplied = ( ) => ( dispatch ) => {
23- dispatch ( {
24- type : FILTERS_APPLIED ,
25- } ) ;
26- } ;
27-
28- export const filterChanged = ( ) => ( dispatch ) => {
14+ export const filterChanged = ( { filter } ) => ( dispatch ) => {
2915 dispatch ( {
3016 type : FILTER_CHANGED ,
17+ payload : { filter } ,
3118 } ) ;
3219} ;
3320
34- export const pageChanged = ( ) => ( dispatch ) => {
21+ export const pageChanged = ( { pageNumber } ) => ( dispatch ) => {
3522 dispatch ( {
3623 type : PAGE_CHANGED ,
24+ payload : { pageNumber } ,
3725 } ) ;
3826} ;
3927
40- export const pageSizeChanged = ( ) => ( dispatch ) => {
28+ export const pageSizeChanged = ( { pageSize } ) => ( dispatch ) => {
4129 dispatch ( {
4230 type : PAGE_SIZE_CHANGED ,
31+ payload : { pageSize } ,
4332 } ) ;
4433} ;
4534
46- export const sortChanged = ( ) => ( dispatch ) => {
35+ export const sortChanged = ( { sortField , isSortAscending } ) => ( dispatch ) => {
4736 dispatch ( {
4837 type : SORT_CHANGED ,
38+ payload : { sortField, isSortAscending } ,
4939 } ) ;
5040} ;
You can’t perform that action at this time.
0 commit comments