Fix sort icons (#17984)

* Fix sort icons

* Run linter

* Fix return value for unsorted headers

---------

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
This commit is contained in:
Nitwel
2023-04-10 14:27:12 +02:00
committed by GitHub
parent e56a6715be
commit 8ea94c317b
2 changed files with 4 additions and 1 deletions

View File

@@ -180,7 +180,8 @@ function getClassesForHeader(header: Header) {
}
function getTooltipForSortIcon(header: Header) {
return props.sort.by === header.value && props.sort.desc === false ? 'sort_desc' : 'sort_asc';
if (props.sort.by === null || props.sort.by !== header.value) return 'sort_asc';
return props.sort.desc === false ? 'sort_desc' : 'disable_sort';
}
function changeSort(header: Header) {
@@ -327,6 +328,7 @@ function toggleManualSort() {
color: var(--foreground-subdued);
opacity: 0;
transition: opacity var(--fast) var(--transition);
transform: scaleY(-1);
}
&:hover .action-icon {

View File

@@ -1458,6 +1458,7 @@ export_started: Export Started
export_started_copy: Your export has started. You'll be notified when it's ready to download.
sort_asc: Sort Ascending
sort_desc: Sort Descending
disable_sort: Disable Sorting
template: Template
require_value_to_be_set: Require value to be set on creation
translation: Translation