From d0b71ada08ec6695559f3687647d342d480e7a2c Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 20 Oct 2023 09:08:45 +0100 Subject: [PATCH] Ensure BBUI table component ignores numeric widths that are invalid --- packages/bbui/src/Table/Table.svelte | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/bbui/src/Table/Table.svelte b/packages/bbui/src/Table/Table.svelte index 529d1144ee..885dd75671 100644 --- a/packages/bbui/src/Table/Table.svelte +++ b/packages/bbui/src/Table/Table.svelte @@ -106,6 +106,13 @@ name: fieldName, } } + + // Delete numeric only widths as these are grid widths and should be + // ignored + let width = fixedSchema[fieldName].width + if (width != null && `${width}`.trim().match(/^[0-9]+$/)) { + delete fixedSchema[fieldName].width + } }) return fixedSchema }