Merge sort order into sort buttons
This commit is contained in:
parent
8a9f1a3c25
commit
c0ad216227
1 changed files with 14 additions and 4 deletions
|
@ -1134,7 +1134,17 @@ function Catchup() {
|
||||||
'density',
|
'density',
|
||||||
// 'account',
|
// 'account',
|
||||||
].map((key) => (
|
].map((key) => (
|
||||||
<label class="filter-sort" key={key}>
|
<label
|
||||||
|
class="filter-sort"
|
||||||
|
key={key}
|
||||||
|
onClick={(e) => {
|
||||||
|
if (sortBy === key) {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
setSortOrder(sortOrder === 'asc' ? 'desc' : 'asc');
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
<input
|
<input
|
||||||
type="radio"
|
type="radio"
|
||||||
name="filter-sort-cat"
|
name="filter-sort-cat"
|
||||||
|
@ -1148,7 +1158,6 @@ function Catchup() {
|
||||||
: 'asc';
|
: 'asc';
|
||||||
setSortOrder(order);
|
setSortOrder(order);
|
||||||
}}
|
}}
|
||||||
// disabled={key === 'account' && selectedAuthor}
|
|
||||||
/>
|
/>
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
@ -1159,10 +1168,11 @@ function Catchup() {
|
||||||
density: 'Density',
|
density: 'Density',
|
||||||
}[key]
|
}[key]
|
||||||
}
|
}
|
||||||
|
{sortBy === key && (sortOrder === 'asc' ? ' ↑' : ' ↓')}
|
||||||
</label>
|
</label>
|
||||||
))}
|
))}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset class="radio-field-group">
|
{/* <fieldset class="radio-field-group">
|
||||||
{['asc', 'desc'].map((key) => (
|
{['asc', 'desc'].map((key) => (
|
||||||
<label class="filter-sort" key={key}>
|
<label class="filter-sort" key={key}>
|
||||||
<input
|
<input
|
||||||
|
@ -1176,7 +1186,7 @@ function Catchup() {
|
||||||
{key === 'asc' ? '↑' : '↓'}
|
{key === 'asc' ? '↑' : '↓'}
|
||||||
</label>
|
</label>
|
||||||
))}
|
))}
|
||||||
</fieldset>
|
</fieldset> */}
|
||||||
<span class="filter-label">Group</span>{' '}
|
<span class="filter-label">Group</span>{' '}
|
||||||
<fieldset class="radio-field-group">
|
<fieldset class="radio-field-group">
|
||||||
{[null, 'account'].map((key) => (
|
{[null, 'account'].map((key) => (
|
||||||
|
|
Loading…
Add table
Reference in a new issue