Keep category pills visible in article name edit mode
This commit is contained in:
@@ -106,13 +106,24 @@ export default function ArticleViewName({ article: articleData, categories, root
|
|||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
renderEdit={(draft, onChange, inputRef) => (
|
renderEdit={(draft, onChange, inputRef) => (
|
||||||
<SingleLineTextEdit
|
<Box sx={{ display: 'flex', flexDirection: 'column', flex: 1, alignSelf: 'stretch' }}>
|
||||||
inputRef={inputRef}
|
<Box sx={{ flex: 1, display: 'flex', alignItems: 'center' }}>
|
||||||
label="Name"
|
<SingleLineTextEdit
|
||||||
value={draft.name}
|
inputRef={inputRef}
|
||||||
onChange={(name) => onChange({ name })}
|
label="Name"
|
||||||
sx={articleNameFieldSx}
|
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>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user