Use name (not display name) on saving
This commit is contained in:
parent
b7fc1cddb7
commit
d01bd54fd1
|
@ -89,7 +89,7 @@
|
||||||
on:contextmenu={openContextMenu}
|
on:contextmenu={openContextMenu}
|
||||||
{icon}
|
{icon}
|
||||||
iconColor={"var(--spectrum-global-color-gray-900)"}
|
iconColor={"var(--spectrum-global-color-gray-900)"}
|
||||||
text={automation.name}
|
text={automation.displayName}
|
||||||
selected={automation._id === $selectedAutomation?._id}
|
selected={automation._id === $selectedAutomation?._id}
|
||||||
hovering={automation._id === $contextMenuStore.id}
|
hovering={automation._id === $contextMenuStore.id}
|
||||||
on:click={() => automationStore.actions.select(automation._id)}
|
on:click={() => automationStore.actions.select(automation._id)}
|
||||||
|
|
|
@ -19,13 +19,13 @@
|
||||||
})
|
})
|
||||||
.map(automation => ({
|
.map(automation => ({
|
||||||
...automation,
|
...automation,
|
||||||
name:
|
displayName:
|
||||||
$automationStore.automationDisplayData[automation._id].displayName ||
|
$automationStore.automationDisplayData[automation._id].displayName ||
|
||||||
automation.name,
|
automation.name,
|
||||||
}))
|
}))
|
||||||
.sort((a, b) => {
|
.sort((a, b) => {
|
||||||
const lowerA = a.name.toLowerCase()
|
const lowerA = a.displayName.toLowerCase()
|
||||||
const lowerB = b.name.toLowerCase()
|
const lowerB = b.displayName.toLowerCase()
|
||||||
return lowerA > lowerB ? 1 : -1
|
return lowerA > lowerB ? 1 : -1
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue