Unify category autocomplete fields
All checks were successful
Deploy Sokko G / deploy (push) Successful in 17s

This commit is contained in:
Shinuwa 2026-09-04 14:09:08 +02:00
parent e3d823d0b1
commit 055fb78d60
21 changed files with 739 additions and 168 deletions

View file

@ -12,6 +12,10 @@ import { useCombosReorder } from "./useCombosReorder.js";
export function CombosModule({ toolboxId, moduleId, context, editing, textExchangeOpen }) {
const data = context.normalizeCombosData(context.getModuleData(toolboxId, moduleId, { combos: [] }));
const textContent = context.moduleText?.combos || {};
const categoryOptions = [
...data.categoryOrder,
...data.combos.map(getComboCategory).filter(Boolean).filter((category) => !data.categoryOrder.includes(category))
];
const entries = getGroupedEntries(data.combos, {
groupOrder: data.categoryOrder,
getItemGroup: getComboCategory,
@ -48,6 +52,7 @@ export function CombosModule({ toolboxId, moduleId, context, editing, textExchan
<CombosEditor
data={data}
textContent={textContent}
categoryOptions={categoryOptions}
comboCategory={editorState.comboCategory}
comboName={editorState.comboName}
customKey={editorState.customKey}