fix: priority none filter (#1407)

This commit is contained in:
Aaryan Khandelwal 2023-06-27 18:01:57 +05:30 committed by GitHub
parent b0cdcfd91e
commit 7f1def2041
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -135,7 +135,7 @@ export const FilterList: React.FC<any> = ({ filters, setFilters }) => {
}`} }`}
> >
<span>{getPriorityIcon(priority)}</span> <span>{getPriorityIcon(priority)}</span>
<span>{priority ? priority : "None"}</span> <span>{priority === "null" ? "None" : priority}</span>
<span <span
className="cursor-pointer" className="cursor-pointer"
onClick={() => onClick={() =>

View File

@ -39,7 +39,7 @@ export const FiltersDropdown: React.FC = () => {
value: PRIORITIES, value: PRIORITIES,
children: [ children: [
...PRIORITIES.map((priority) => ({ ...PRIORITIES.map((priority) => ({
id: priority ?? "none", id: priority === null ? "null" : priority,
label: ( label: (
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
{getPriorityIcon(priority)} {priority ?? "None"} {getPriorityIcon(priority)} {priority ?? "None"}
@ -47,9 +47,9 @@ export const FiltersDropdown: React.FC = () => {
), ),
value: { value: {
key: "priority", key: "priority",
value: priority, value: priority === null ? "null" : priority,
}, },
selected: filters?.priority?.includes(priority ?? "none"), selected: filters?.priority?.includes(priority === null ? "null" : priority),
})), })),
], ],
}, },