File tree Expand file tree Collapse file tree 4 files changed +21
-3
lines changed
Expand file tree Collapse file tree 4 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 1+ audience: users
2+ level: patch
3+ reference: issue 5433
4+ ---
5+ Show workers from last recently active. Also, removed the deprecated prop ` onChangePage ` and replaced with ` onPageChange ` .
Original file line number Diff line number Diff line change @@ -247,7 +247,7 @@ export default class ConnectionDataTable extends Component {
247247 nextIconButtonProps = { {
248248 'aria-label' : 'Next Page' ,
249249 } }
250- onChangePage = { this . handlePageChange }
250+ onPageChange = { this . handlePageChange }
251251 />
252252 ) ;
253253 } ;
Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ export default class DataTable extends Component {
199199 nextIconButtonProps = { {
200200 'aria-label' : 'Next Page' ,
201201 } }
202- onChangePage = { this . handlePageChange }
202+ onPageChange = { this . handlePageChange }
203203 />
204204 ) }
205205 </ Fragment >
Original file line number Diff line number Diff line change @@ -118,11 +118,24 @@ export default class WorkersTable extends Component {
118118 return mapping [ query . sortBy ] ;
119119 }
120120
121+ componentDidMount ( ) {
122+ const query = parse ( this . props . location . search . slice ( 1 ) ) ;
123+
124+ if ( query . sortBy ) return ;
125+
126+ this . props . history . replace ( {
127+ search : stringify (
128+ { sortBy : 'Last Active' , sortDirection : 'desc' } ,
129+ { addQueryPrefix : true }
130+ ) ,
131+ } ) ;
132+ }
133+
121134 render ( ) {
122135 const query = parse ( this . props . location . search . slice ( 1 ) ) ;
123136 const { sortBy, sortDirection } = query . sortBy
124137 ? query
125- : { sortBy : null , sortDirection : null } ;
138+ : { sortBy : 'Last Active' , sortDirection : 'desc' } ;
126139 const {
127140 provisionerId,
128141 workerType,
You can’t perform that action at this time.
0 commit comments