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