Added search filtering to map select

This commit is contained in:
Mitchell McCaffrey
2020-09-30 15:39:56 +10:00
parent 27dfecf649
commit 29ce562d01
4 changed files with 41 additions and 7 deletions
+5 -2
View File
@@ -29,6 +29,8 @@ function MapTiles({
onDone,
selectMode,
onSelectModeChange,
search,
onSearchChange,
}) {
const { databaseStatus } = useContext(DatabaseContext);
const isSmallScreen = useMedia({ query: "(max-width: 500px)" });
@@ -70,7 +72,7 @@ function MapTiles({
}}
onFocus={() => onMapSelect()}
>
<Search />
<Search value={search} onChange={onSearchChange} />
<Flex
mr={1}
px={1}
@@ -105,7 +107,7 @@ function MapTiles({
<AddIcon />
</IconButton>
</Flex>
<SimpleBar style={{ maxHeight: "400px" }}>
<SimpleBar style={{ height: "400px" }}>
<Flex
p={2}
pb={4}
@@ -113,6 +115,7 @@ function MapTiles({
sx={{
flexWrap: "wrap",
borderRadius: "4px",
minHeight: "400px",
}}
onClick={() => onMapSelect()}
>