fixes for mobile view broken

This commit is contained in:
2026-05-24 13:52:34 +05:30
parent 170769c317
commit 4a3428ed8f
2 changed files with 25 additions and 8 deletions

View File

@@ -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 (