File tree Expand file tree Collapse file tree 3 files changed +30
-22
lines changed
source/renderer/app/components/staking/stake-pools Expand file tree Collapse file tree 3 files changed +30
-22
lines changed Original file line number Diff line number Diff line change @@ -17,16 +17,19 @@ import {
1717} from '../../../utils/formatters' ;
1818import { messages } from './StakePoolsTable.messages' ;
1919
20+ const ascOrder = 'asc' ;
21+ const descOrder = 'desc' ;
22+
2023export const defaultTableOrdering = {
21- ranking : 'asc' ,
22- ticker : 'asc' ,
23- saturation : 'asc' ,
24- cost : 'asc' ,
25- profitMargin : 'asc' ,
26- producedBlocks : 'desc' ,
27- nonMyopicMemberRewards : 'desc' ,
28- pledge : 'asc' ,
29- retiring : 'asc' ,
24+ ranking : ascOrder ,
25+ ticker : ascOrder ,
26+ saturation : ascOrder ,
27+ cost : ascOrder ,
28+ profitMargin : ascOrder ,
29+ producedBlocks : descOrder ,
30+ nonMyopicMemberRewards : descOrder ,
31+ pledge : ascOrder ,
32+ retiring : ascOrder ,
3033} ;
3134
3235interface UseSortedStakePoolListArgs {
@@ -320,5 +323,5 @@ export const useCreateColumns = ({
320323 } ,
321324 } ,
322325 ] ,
323- [ ]
326+ [ numberOfRankedStakePools ]
324327 ) ;
Original file line number Diff line number Diff line change 364364
365365 // Rank
366366 & :nth-child (1 ) {
367- width : 7% !important ;
367+ width : 7% ;
368368 }
369369 // Ticker
370370 & :nth-child (2 ) {
371- width : 9% !important ;
371+ width : 9% ;
372372 }
373373 // Saturation
374374 & :nth-child (3 ) {
375- width : 11% !important ;
375+ width : 11% ;
376376 }
377377 // Cost
378378 & :nth-child (4 ) {
379- width : 10% !important ;
379+ width : 10% ;
380380 }
381381 // Margin
382382 & :nth-child (5 ) {
383- width : 8% !important ;
383+ width : 8% ;
384384 }
385385 // Produced Blocks
386386 & :nth-child (6 ) {
387- width : 15% !important ;
387+ width : 15% ;
388388 }
389389 // Potential Rewards
390390 & :nth-child (7 ) {
391- width : 16% !important ;
391+ width : 16% ;
392392 }
393393 // Pledge
394394 & :nth-child (8 ) {
395- width : 12% !important ;
395+ width : 12% ;
396396 }
397397 // Retiring in
398398 & :nth-child (9 ) {
399- width : 12% !important ;
399+ width : 12% ;
400400 }
401401 }
402402 }
Original file line number Diff line number Diff line change @@ -145,7 +145,10 @@ function StakePoolsTableComponent({
145145 { row . cells . map ( ( cell ) => {
146146 return (
147147 /* eslint-disable-next-line react/jsx-key */
148- < div { ...cell . getCellProps ( ) } className = { styles . td } >
148+ < div
149+ { ...cell . getCellProps ( { style : { width : undefined } } ) }
150+ className = { styles . td }
151+ >
149152 { cell . render ( 'Cell' ) }
150153 </ div >
151154 ) ;
@@ -196,7 +199,9 @@ function StakePoolsTableComponent({
196199 >
197200 { headerGroup . headers . map ( ( column ) => (
198201 < StakePoolsTableHeader
199- { ...column . getHeaderProps ( ) }
202+ { ...column . getHeaderProps ( {
203+ style : { width : undefined } ,
204+ } ) }
200205 stakePoolsSortBy = { stakePoolsSortBy }
201206 stakePoolsOrder = { stakePoolsOrder }
202207 onHandleSort = { handleSort }
@@ -222,7 +227,7 @@ function StakePoolsTableComponent({
222227 height = { height || 0 }
223228 isScrolling = { isScrolling }
224229 onScroll = { onChildScroll }
225- overscanRowCount = { 2 }
230+ overscanRowCount = { 10 }
226231 rowCount = { rows . length }
227232 rowHeight = { 36 }
228233 rowRenderer = { RenderRow }
You can’t perform that action at this time.
0 commit comments