mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
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:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user