mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-02 17:25:22 +03:00
Only show the sub labels filter when there are sub labels in the DB
This commit is contained in:
parent
5ce478c586
commit
f2409171fe
@ -270,18 +270,21 @@ export default function Events({ path, ...props }) {
|
|||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
</select>
|
</select>
|
||||||
<select
|
{
|
||||||
className="basis-1/5 cursor-pointer rounded dark:bg-slate-800"
|
filterValues.sub_labels.length > 0 && (
|
||||||
value={searchParams.sub_label}
|
<select
|
||||||
onChange={(e) => onFilter('sub_label', e.target.value)}
|
className="basis-1/5 cursor-pointer rounded dark:bg-slate-800"
|
||||||
>
|
value={searchParams.sub_label}
|
||||||
<option value="all">all sub labels</option>
|
onChange={(e) => onFilter('sub_label', e.target.value)}
|
||||||
{filterValues.sub_labels.map((item) => (
|
>
|
||||||
<option key={item} value={item}>
|
<option value="all">all sub labels</option>
|
||||||
{item}
|
{filterValues.sub_labels.map((item) => (
|
||||||
</option>
|
<option key={item} value={item}>
|
||||||
))}
|
{item}
|
||||||
</select>
|
</option>
|
||||||
|
))}
|
||||||
|
</select>
|
||||||
|
)}
|
||||||
<div ref={datePicker} className="ml-auto">
|
<div ref={datePicker} className="ml-auto">
|
||||||
<CalendarIcon
|
<CalendarIcon
|
||||||
className="h-8 w-8 cursor-pointer"
|
className="h-8 w-8 cursor-pointer"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user