File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,11 @@ export const DataActionsBar: FC<DataActionsBarProps> = ({
6565 [ chosenFilters , filterOptions ] ,
6666 ) ;
6767
68+ const chosenSortingLabel = useMemo ( ( ) => {
69+ const opt = ( sortOptions ?? [ ] ) . find ( ( o ) => o . key === chosenSorting ) ;
70+ return opt ?. label ?? chosenSorting ;
71+ } , [ sortOptions , chosenSorting ] ) ;
72+
6873 const handleRemoveFilter = ( key : string ) =>
6974 setChosenFilters ?.( ( prev ) => ( prev ?? [ ] ) . filter ( ( k ) => k !== key ) ) ;
7075
@@ -135,7 +140,7 @@ export const DataActionsBar: FC<DataActionsBarProps> = ({
135140 filtersOpen = { effectiveFiltersOpen }
136141 isFiltering = { isFiltering }
137142 setFiltersOpen = { setEffectiveFiltersOpen }
138- chosenSorting = { chosenSorting }
143+ chosenSorting = { chosenSortingLabel }
139144 setSortOpen = { setEffectiveSortOpen }
140145 sortOpen = { effectiveSortOpen }
141146 >
Original file line number Diff line number Diff line change 11export const DREP_DIRECTORY_SORTING = [
22 {
33 key : "Activity" ,
4- label : "Activity" ,
4+ label : "Activity Voting " ,
55 } ,
66 {
77 key : "RegistrationDate" ,
You can’t perform that action at this time.
0 commit comments