diff --git a/packages/frontend/src/components/projects/project/deployments/FilterForm.tsx b/packages/frontend/src/components/projects/project/deployments/FilterForm.tsx index 78324ef..3668b7a 100644 --- a/packages/frontend/src/components/projects/project/deployments/FilterForm.tsx +++ b/packages/frontend/src/components/projects/project/deployments/FilterForm.tsx @@ -22,7 +22,7 @@ export enum StatusOptions { export interface FilterValue { searchedBranch: string; - status: StatusOptions; + status: StatusOptions | string; updateAtRange?: Value; } @@ -64,13 +64,11 @@ const FilterForm = ({ value, onChange }: FilterFormProps) => { } }; - const statusOptions = Object.values(StatusOptions) - .map((status) => ({ - label: status, - value: status, - leftIcon: getOptionIcon(status), - })) - .filter((status) => status.value !== StatusOptions.ALL_STATUS); + const statusOptions = Object.values(StatusOptions).map((status) => ({ + label: status, + value: status, + leftIcon: getOptionIcon(status), + })); const handleReset = () => { setSearchedBranch(''); @@ -104,11 +102,15 @@ const FilterForm = ({ value, onChange }: FilterFormProps) => { options={statusOptions} clearable placeholder="All status" - value={{ label: selectedStatus, value: selectedStatus }} + value={ + selectedStatus + ? { label: selectedStatus, value: selectedStatus } + : undefined + } onChange={(item) => setSelectedStatus((item as SelectOption).value as StatusOptions) } - onClear={() => setSelectedStatus(StatusOptions.ALL_STATUS)} + onClear={() => setSelectedStatus('')} /> diff --git a/packages/frontend/src/pages/org-slug/projects/id/Deployments.tsx b/packages/frontend/src/pages/org-slug/projects/id/Deployments.tsx index 25be67b..1437754 100644 --- a/packages/frontend/src/pages/org-slug/projects/id/Deployments.tsx +++ b/packages/frontend/src/pages/org-slug/projects/id/Deployments.tsx @@ -14,7 +14,7 @@ import { RefreshIcon } from 'components/shared/CustomIcon'; const DEFAULT_FILTER_VALUE: FilterValue = { searchedBranch: '', - status: StatusOptions.ALL_STATUS, + status: '', }; const FETCH_DEPLOYMENTS_INTERVAL = 5000;