dropdown fix

This commit is contained in:
makearmy 2025-09-27 07:53:53 -04:00
parent 3e2ab48094
commit 12143cd4ce

View file

@ -170,7 +170,7 @@ export default function RigBuilderClient() {
try {
// software (generic list; if you have target-aware, swap the endpoint)
const soft = await apiJson<{ data: Option[] }>(`/api/options/laser_soft`);
const soft = await apiJson<{ data: Option[] }>(`/api/options/laser_software`);
setSoftwareOpts(soft.data ?? []);
} catch {
setSoftwareOpts([]);
@ -305,7 +305,7 @@ export default function RigBuilderClient() {
<SelectValue placeholder="Choose a rig type" />
</SelectTrigger>
{/* add scroll so big lists are usable */}
<SelectContent className="max-h-64 overflow-y-auto">
<SelectContent position="popper" className="max-h-64 overflow-y-auto z-50 bg-background text-foreground border">
{rigTypeItems.map((rt) => (
<SelectItem key={rt.value} value={rt.value}>
{rt.label}
@ -325,7 +325,7 @@ export default function RigBuilderClient() {
<SelectTrigger>
<SelectValue placeholder="Optional" />
</SelectTrigger>
<SelectContent className="max-h-64 overflow-y-auto">
<SelectContent position="popper" className="max-h-64 overflow-y-auto z-50 bg-background text-foreground border">
<SelectItem value="none"></SelectItem>
{sourceOpts.map((o) => (
<SelectItem key={o.id} value={String(o.id)}>
@ -346,7 +346,7 @@ export default function RigBuilderClient() {
<SelectTrigger>
<SelectValue placeholder="Optional" />
</SelectTrigger>
<SelectContent className="max-h-64 overflow-y-auto">
<SelectContent position="popper" className="max-h-64 overflow-y-auto z-50 bg-background text-foreground border">
<SelectItem value="none"></SelectItem>
{softwareOpts.map((o) => (
<SelectItem key={o.id} value={String(o.id)}>
@ -375,7 +375,7 @@ export default function RigBuilderClient() {
<SelectTrigger>
<SelectValue placeholder="Optional" />
</SelectTrigger>
<SelectContent className="max-h-64 overflow-y-auto">
<SelectContent position="popper" className="max-h-64 overflow-y-auto z-50 bg-background text-foreground border">
<SelectItem value="none"></SelectItem>
{focusLensOpts.map((o) => (
<SelectItem key={o.id} value={String(o.id)}>
@ -400,7 +400,7 @@ export default function RigBuilderClient() {
<SelectTrigger>
<SelectValue placeholder="Optional" />
</SelectTrigger>
<SelectContent className="max-h-64 overflow-y-auto">
<SelectContent position="popper" className="max-h-64 overflow-y-auto z-50 bg-background text-foreground border">
<SelectItem value="none"></SelectItem>
{scanLensOpts.map((o) => (
<SelectItem key={o.id} value={String(o.id)}>
@ -420,7 +420,7 @@ export default function RigBuilderClient() {
<SelectTrigger>
<SelectValue placeholder="Optional" />
</SelectTrigger>
<SelectContent className="max-h-64 overflow-y-auto">
<SelectContent position="popper" className="max-h-64 overflow-y-auto z-50 bg-background text-foreground border">
<SelectItem value="none"></SelectItem>
{/* These can be swapped to real options when you expose them as /api/options/... */}
<SelectItem value="10mm">10 mm</SelectItem>
@ -440,7 +440,7 @@ export default function RigBuilderClient() {
<SelectTrigger>
<SelectValue placeholder="Optional" />
</SelectTrigger>
<SelectContent className="max-h-64 overflow-y-auto">
<SelectContent position="popper" className="max-h-64 overflow-y-auto z-50 bg-background text-foreground border">
<SelectItem value="none"></SelectItem>
<SelectItem value="1.5x">1.5×</SelectItem>
<SelectItem value="2x">2×</SelectItem>