From ca07b5d3b9bd7cfcd757261547c2421b960a59b2 Mon Sep 17 00:00:00 2001 From: robertsLando Date: Mon, 3 Feb 2025 11:07:19 +0100 Subject: [PATCH] fix(ui): sort filtered nodes by name Fixes #4114 --- src/components/dialogs/DialogAssociation.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/dialogs/DialogAssociation.vue b/src/components/dialogs/DialogAssociation.vue index 8f1134948b7..b15ae03b10c 100644 --- a/src/components/dialogs/DialogAssociation.vue +++ b/src/components/dialogs/DialogAssociation.vue @@ -159,11 +159,13 @@ export default { filteredNodes() { return this.node.protocol === Protocols.ZWaveLongRange ? [this.controllerNode] - : this.nodes.filter( - (n) => - n.id !== this.node.id && - n.protocol !== Protocols.ZWaveLongRange, - ) + : this.nodes + .filter( + (n) => + n.id !== this.node.id && + n.protocol !== Protocols.ZWaveLongRange, + ) + .sort((a, b) => a._name.localeCompare(b._name)) }, endpoints() { return this.getEndpointItems(this.node)