Set labels on items in the home screen when editing there

This commit is contained in:
Jackson Harper
2023-06-19 16:39:50 +08:00
parent 0b7cd80c85
commit ad921fdff2

View File

@ -230,12 +230,13 @@ export function ArticleActionsMenu(
}}
save={(labels: Label[]) => {
if (props.article?.id) {
return (
setLabelsMutation(
const result =
(await setLabelsMutation(
props.article?.id,
labels.map((l) => l.id)
) ?? []
)
)) ?? []
props.article.labels = result
return Promise.resolve(result)
}
return Promise.resolve(labels)
}}