sorting
This commit is contained in:
@@ -165,6 +165,7 @@ const Sidebar = ({
|
||||
onCreateFolder,
|
||||
creatingFolder = false,
|
||||
tags = [],
|
||||
untaggedFilterId = null,
|
||||
activeTagIds = [],
|
||||
onToggleTagFilter,
|
||||
correspondents = [],
|
||||
@@ -215,6 +216,7 @@ const Sidebar = ({
|
||||
);
|
||||
const handleToggleTag = onToggleTagFilter || (() => {});
|
||||
const activeTagSet = new Set(activeTagIds);
|
||||
const untaggedActive = untaggedFilterId ? activeTagSet.has(untaggedFilterId) : false;
|
||||
const handleManageTags = onManageTags || (() => {});
|
||||
const handleManageCorrespondents = onManageCorrespondents || (() => {});
|
||||
const handleCreateTag = useCallback(async () => {
|
||||
@@ -619,6 +621,20 @@ const Sidebar = ({
|
||||
}`}
|
||||
role="list"
|
||||
>
|
||||
{untaggedFilterId ? (
|
||||
<button
|
||||
type="button"
|
||||
role="listitem"
|
||||
className={`sidebar-tag-pill sidebar-tag-pill--untagged${
|
||||
untaggedActive ? ' active' : ''
|
||||
}`}
|
||||
onClick={() => handleToggleTag(untaggedFilterId)}
|
||||
aria-pressed={untaggedActive}
|
||||
draggable={false}
|
||||
>
|
||||
No tag assigned
|
||||
</button>
|
||||
) : null}
|
||||
{tags.map((tag) => {
|
||||
const isActive = activeTagSet.has(tag.id);
|
||||
const style = getTagColorStyle(tag.color);
|
||||
|
||||
Reference in New Issue
Block a user