Fix status undefined (#2958)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2023-04-12 16:10:41 +06:00 committed by GitHub
parent a940f0b9fd
commit 8d0e911f28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View File

@ -406,7 +406,7 @@
btn,
(result) => {
if (result && result.id) {
selectedState = { ...result, _id: result.id, title: result.label }
selectedState = { ...result, _id: result.id, name: result.label }
}
manager.setFocusPos(3)
}

View File

@ -186,7 +186,7 @@
btn,
(result) => {
if (result && result.id) {
selectedState = { ...result, _id: result.id, title: result.label }
selectedState = { ...result, _id: result.id, name: result.label }
}
manager.setFocusPos(3)
}
@ -195,8 +195,13 @@
>
<div slot="content" class="flex-row-center" class:empty={!selectedState}>
{#if selectedState}
<div class="color" style="background-color: {getPlatformColor(selectedState.color)}" />
<span class="label overflow-label">{selectedState.title}</span>
<div
class="color"
style="background-color: {getPlatformColor(
selectedState.color ?? getColorNumberByText(selectedState.name)
)}"
/>
<span class="label overflow-label">{selectedState.name}</span>
{:else}
<div class="color" />
<span class="label overflow-label"><Label label={presentation.string.NotSelected} /></span>