Keep category pills visible in article name edit mode

This commit is contained in:
seb
2026-08-03 08:41:14 +02:00
parent 7ed6802070
commit 26d7c4a021

View File

@@ -106,13 +106,24 @@ export default function ArticleViewName({ article: articleData, categories, root
</Box>
)}
renderEdit={(draft, onChange, inputRef) => (
<SingleLineTextEdit
inputRef={inputRef}
label="Name"
value={draft.name}
onChange={(name) => onChange({ name })}
sx={articleNameFieldSx}
/>
<Box sx={{ display: 'flex', flexDirection: 'column', flex: 1, alignSelf: 'stretch' }}>
<Box sx={{ flex: 1, display: 'flex', alignItems: 'center' }}>
<SingleLineTextEdit
inputRef={inputRef}
label="Name"
value={draft.name}
onChange={(name) => onChange({ name })}
sx={articleNameFieldSx}
/>
</Box>
{categoryLabels.length > 0 && (
<Box sx={pillsContainerSx}>
{categoryLabels.map(({ id, label }) => (
<Chip key={id} label={label} size="small" variant="outlined" />
))}
</Box>
)}
</Box>
)}
/>
);