diff --git a/package.json b/package.json index 347e78b..e4280c4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "covid-obce", - "version": "3.3.1", + "version": "3.4.0", "private": true, "homepage": "https://covidvobcich.cz", "dependencies": { diff --git a/src/components/layout/appbar/SearchField/SearchField.js b/src/components/layout/appbar/SearchField/SearchField.js index b027210..524cc30 100644 --- a/src/components/layout/appbar/SearchField/SearchField.js +++ b/src/components/layout/appbar/SearchField/SearchField.js @@ -12,7 +12,7 @@ import { SET_SNACKBAR_MESSAGE, } from "../../../../utils/municipalitiesReducer"; import { MUNICIPALITY_NAMES_SEARCH_QUERY } from "../../../../utils/queries"; -import { useStyles } from "./SearchField.style"; +import { useSearchFieldStyles, useOptionsStyles } from "./SearchField.style"; export default function SearchField({ inputRef }) { const dispatch = useMunicipalitiesDispatch(); @@ -36,7 +36,8 @@ export default function SearchField({ inputRef }) { } }, [obce.data, obce.loading, obce.error, inputValue, dispatch]); - const classes = useStyles(); + const searchFieldStyles = useSearchFieldStyles(); + const optionsStyles = useOptionsStyles(); const filterOptions = createFilterOptions({ trim: true, @@ -45,7 +46,7 @@ export default function SearchField({ inputRef }) { return ( ( + <> + {option.obec_nazev} + (okres {option.okres_nazev}) + + )} renderInput={(params) => ( ({ +export const useSearchFieldStyles = makeStyles(() => ({ inputRoot: { color: "#fff", }, @@ -9,5 +9,13 @@ export const useStyles = makeStyles(() => ({ }, clearIndicator: { color: "#fff", - }, + } +})); + +export const useOptionsStyles = makeStyles(() => ({ + districtText: { + color: "#666", + marginLeft: ".3rem", + fontSize: ".8rem" + } })); diff --git a/src/utils/queries.js b/src/utils/queries.js index 34a9af0..30c5c4b 100644 --- a/src/utils/queries.js +++ b/src/utils/queries.js @@ -24,6 +24,7 @@ export const MUNICIPALITY_NAMES_SEARCH_QUERY = gql` obce(obec_nazev: $obec_nazev, datum: "2020-11-05") { obec_nazev obec_kod + okres_nazev } } `;