change: sort task labels based on label color position
This commit is contained in:
parent
559fcbc0e4
commit
a90ace7a06
@ -166,20 +166,23 @@ const Card = React.forwardRef(
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{labels &&
|
{labels &&
|
||||||
labels.map(label => (
|
labels
|
||||||
<ListCardLabel
|
.slice()
|
||||||
onAnimationEnd={() => {
|
.sort((a, b) => a.labelColor.position - b.labelColor.position)
|
||||||
if (setToggleLabels) {
|
.map(label => (
|
||||||
setToggleLabels(false);
|
<ListCardLabel
|
||||||
}
|
onAnimationEnd={() => {
|
||||||
}}
|
if (setToggleLabels) {
|
||||||
variant={labelVariant ?? 'large'}
|
setToggleLabels(false);
|
||||||
color={label.labelColor.colorHex}
|
}
|
||||||
key={label.id}
|
}}
|
||||||
>
|
variant={labelVariant ?? 'large'}
|
||||||
<ListCardLabelText>{label.name}</ListCardLabelText>
|
color={label.labelColor.colorHex}
|
||||||
</ListCardLabel>
|
key={label.id}
|
||||||
))}
|
>
|
||||||
|
<ListCardLabelText>{label.name}</ListCardLabelText>
|
||||||
|
</ListCardLabel>
|
||||||
|
))}
|
||||||
</ListCardLabels>
|
</ListCardLabels>
|
||||||
{editable ? (
|
{editable ? (
|
||||||
<EditorContent>
|
<EditorContent>
|
||||||
|
Loading…
Reference in New Issue
Block a user