fixes for mobile view broken
This commit is contained in:
@@ -5,10 +5,6 @@ import {
|
||||
Paper,
|
||||
TextField,
|
||||
Autocomplete,
|
||||
Select,
|
||||
MenuItem,
|
||||
FormControl,
|
||||
InputLabel,
|
||||
Typography,
|
||||
} from "@mui/material";
|
||||
import FilterListIcon from "@mui/icons-material/FilterList";
|
||||
@@ -59,7 +55,7 @@ function extractOptions(
|
||||
}
|
||||
}
|
||||
|
||||
console.log('extracted', fieldName, Array.from(values).sort())
|
||||
// console.log('extracted', fieldName, Array.from(values).sort())
|
||||
return Array.from(values).sort();
|
||||
}
|
||||
|
||||
@@ -245,7 +241,8 @@ export default function FilterBar({
|
||||
const field = fields[fieldName];
|
||||
if (!field) return null;
|
||||
|
||||
const options = extractOptions(fieldName, field, data ?? []);
|
||||
const needsOptions = !field.filterType || field.filterType === "autocomplete" || field.filterType === "multiselect";
|
||||
const options = needsOptions ? extractOptions(fieldName, field, data ?? []) : [];
|
||||
const raw = draft[fieldName];
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user