From 736f78c3d6426f4ff8863818fbe032d29751f22c Mon Sep 17 00:00:00 2001 From: melohagan <101575380+melohagan@users.noreply.github.com> Date: Fri, 9 Jun 2023 14:09:14 +0100 Subject: [PATCH] Make sure divider fields are left-most (#10627) * Make sure divider fields are left most * Refactor --- packages/bbui/src/Table/Table.svelte | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/bbui/src/Table/Table.svelte b/packages/bbui/src/Table/Table.svelte index 5bb4ed4523..f8528aac36 100644 --- a/packages/bbui/src/Table/Table.svelte +++ b/packages/bbui/src/Table/Table.svelte @@ -204,6 +204,12 @@ }) return columns .sort((a, b) => { + if (a.divider) { + return a + } + if (b.divider) { + return b + } const orderA = a.order || Number.MAX_SAFE_INTEGER const orderB = b.order || Number.MAX_SAFE_INTEGER const nameA = getDisplayName(a)