Sort automation steps by name
This commit is contained in:
parent
e3fdd1ee46
commit
56021cf4b2
|
@ -1,11 +1,14 @@
|
||||||
<script>
|
<script>
|
||||||
|
import { sortBy } from "lodash/fp"
|
||||||
import { automationStore } from "builderStore"
|
import { automationStore } from "builderStore"
|
||||||
import AutomationBlock from "./AutomationBlock.svelte"
|
import AutomationBlock from "./AutomationBlock.svelte"
|
||||||
import FlatButtonGroup from "components/userInterface/FlatButtonGroup.svelte"
|
import FlatButtonGroup from "components/userInterface/FlatButtonGroup.svelte"
|
||||||
|
|
||||||
let selectedTab = "TRIGGER"
|
let selectedTab = "TRIGGER"
|
||||||
let buttonProps = []
|
let buttonProps = []
|
||||||
$: blocks = Object.entries($automationStore.blockDefinitions[selectedTab])
|
$: blocks = sortBy(entry => entry[1].name)(
|
||||||
|
Object.entries($automationStore.blockDefinitions[selectedTab])
|
||||||
|
)
|
||||||
|
|
||||||
$: {
|
$: {
|
||||||
if ($automationStore.selectedAutomation.hasTrigger()) {
|
if ($automationStore.selectedAutomation.hasTrigger()) {
|
||||||
|
@ -37,3 +40,9 @@
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#blocklist {
|
||||||
|
margin-top: var(--spacing-xl);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue