support filtering by no Tags

closes #269
This commit is contained in:
Collin M. Barrett 2018-10-01 20:57:01 -05:00
parent 4737ad6650
commit ecb4489d11

View file

@ -24,7 +24,7 @@ const filterMethod = (f: Filter, r: any[]): boolean => {
return f.value === "any" ||
(listTagIds
? listTagIds.join(",").split(",").includes(f.value)
: false);
: f.value === "none");
};
const Filter = (props: any, tags: ITag[]) =>
@ -32,6 +32,7 @@ const Filter = (props: any, tags: ITag[]) =>
style={{ width: "100%" }}
value={props.filter ? props.filter.value : "any"}>
<option value="any">Any</option>
<option value="none">None</option>
{tags.length > 0
? tags.map((t: ITag, i: number) =>
<option value={t.id} title={t.description} key={i}>