Skip to content
Snippets Groups Projects
Commit bf366195 authored by Danil Kamyshov's avatar Danil Kamyshov
Browse files

Merge branch 'bugfix/MRM-2693' into 'master'

MRM-2693 [admin] "Clear" button works wrong in "Maintenance requests" tab

Closes MRM-2693

See merge request mashroom/frontend/admin!140
parents 306ebb99 f240fb34
Branches bugfix/MRM-2690
Tags
No related merge requests found
......@@ -26,7 +26,7 @@ import {
common_api_generic_query_QueryParamsFilterInput,
} from "../../globalTypes";
import ALL_MAINTENANCE from "./graphql/queries/GetAllMaintenances.graphql";
import FitlerFieldSort from "../../ui/molecules/FilterFieldSort";
import FilterFieldSort from "../../ui/molecules/FilterFieldSort";
import ListHead from "./ListHead";
import ListItem from "./ListItem";
import Pagebar from "../../ui/molecules/Pagebar";
......@@ -153,27 +153,27 @@ const List = () => {
)}
</SearchFieldWide>
<FilterSort>
<FitlerFieldSort
<FilterFieldSort
name="category"
options={CategoriesOptions}
placeholder="Category"
/>
<FitlerFieldSort
<FilterFieldSort
name="subcategory"
options={SubcategoriesOptions}
placeholder="Subcategory"
/>
<FitlerFieldSort
<FilterFieldSort
name="status"
options={StatusOptions}
placeholder="Status"
/>
<FitlerFieldSort
<FilterFieldSort
name="place"
options={PlaceOptions}
placeholder="Place"
/>
<FitlerFieldSort
<FilterFieldSort
name="specialist_type"
options={SpecialistTypeOptions}
placeholder="Specialist Type"
......
import { Field } from "react-final-form";
import { FilterSortItem } from "../atoms/FilterSort";
import { wrapInputEmptyOption } from "../../util/dropdown";
import Dropdown from "./Dropdown";
import React, { FC } from "react";
......@@ -9,17 +10,21 @@ type Props = {
placeholder: string;
};
const FitlerFieldSort: FC<Props> = ({ name, options, placeholder }) => (
const FilterFieldSort: FC<Props> = ({ name, options, placeholder }) => (
<FilterSortItem style={{ marginBottom: 10 }}>
<Field
name={name}
render={({ input }) => {
return (
<Dropdown input={input} options={options} placeholder={placeholder} />
<Dropdown
input={wrapInputEmptyOption(input)}
options={options}
placeholder={placeholder}
/>
);
}}
/>
</FilterSortItem>
);
export default FitlerFieldSort;
export default FilterFieldSort;
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment