display parent category name in category selects (fixes #1045)

This commit is contained in:
Athou
2023-03-07 08:40:02 +01:00
parent 10bfbbec17
commit 5003c176a2
33 changed files with 132 additions and 15 deletions

View File

@@ -109,7 +109,12 @@ export function CategoryDetailsPage() {
{editable && (
<>
<TextInput label={t`Name`} {...form.getInputProps("name")} required />
<CategorySelect label={t`Parent Category`} {...form.getInputProps("parentId")} clearable />
<CategorySelect
label={t`Parent Category`}
{...form.getInputProps("parentId")}
clearable
withoutCategoryIds={[id]}
/>
<NumberInput label={t`Position`} {...form.getInputProps("position")} required min={0} />
</>
)}