Native Selects auf einheitliche Dropdown-Komponente umgestellt

Mehrere Stellen (ResourceManager SelectField + Material-Browser,
ImportDialog, AttributesPanel, SitePanel, ToolsPanel,
DisplayModeSelect, RichTextEditor) nutzten noch native <select>, deren
Optionsliste vom Betriebssystem gerendert wird und optisch nicht zur
eigenen Dropdown-Komponente (dunkles Kontextmenü-Popover) passt. Jetzt
durchgaengig dieselbe Optik.
This commit is contained in:
2026-07-04 05:01:03 +02:00
parent 9f6d4e8858
commit e0d71691e1
7 changed files with 85 additions and 118 deletions
+9 -11
View File
@@ -25,6 +25,7 @@ import {
distinctLayers,
} from "../io/dxfToDrawings";
import type { CategoryMode } from "../io/dxfToDrawings";
import { Dropdown } from "./Dropdown";
/** Strukturierte Import-Entscheidung, die der Dialog beim Bestätigen liefert. */
export interface ImportDecision {
@@ -226,18 +227,15 @@ export function ImportDialog({
<span>{t("import.target.existing")}</span>
</label>
{targetKind === "existing" && (
<select
className="imp-select"
<Dropdown
value={existingLevelId}
onChange={(e) => setExistingLevelId(e.target.value)}
aria-label={t("import.target.existing")}
>
{project.drawingLevels.map((z) => (
<option key={z.id} value={z.id}>
{z.name} · {t(kindBadgeKey(z.kind))}
</option>
))}
</select>
onChange={(v) => setExistingLevelId(v)}
title={t("import.target.existing")}
options={project.drawingLevels.map((z) => ({
value: z.id,
label: `${z.name} · ${t(kindBadgeKey(z.kind))}`,
}))}
/>
)}
<label className="imp-radio">
<input