From 58fdbb4d85ff598f73bacb924764f48084940afd Mon Sep 17 00:00:00 2001 From: Donkie Date: Sat, 16 Sep 2023 11:01:40 +0200 Subject: [PATCH] Client: Fixed spool select table formatting --- client/src/components/column.tsx | 4 ++++ client/src/components/spoolSelectModal.tsx | 9 ++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/client/src/components/column.tsx b/client/src/components/column.tsx index 8ccd11c..a57bd62 100644 --- a/client/src/components/column.tsx +++ b/client/src/components/column.tsx @@ -23,6 +23,7 @@ interface BaseColumnProps { i18nkey?: string; dataSource: Obj[]; tableState: TableState; + width?: number; } interface FilteredColumnProps { @@ -54,6 +55,9 @@ function Column(props: BaseColumnProps & FilteredColumnProps & CustomC sortOrder: getSortOrderForField(typedSorters, props.dataId ?? props.id), filterMultiple: props.allowMultipleFilters ?? true, }; + if (props.width) { + columnProps.width = props.width; + } if (props.filters && props.filteredValue) { columnProps.filters = props.filters; columnProps.filteredValue = props.filteredValue; diff --git a/client/src/components/spoolSelectModal.tsx b/client/src/components/spoolSelectModal.tsx index c9477d1..5740313 100644 --- a/client/src/components/spoolSelectModal.tsx +++ b/client/src/components/spoolSelectModal.tsx @@ -112,13 +112,7 @@ const SpoolSelectModal: React.FC = ({ visible, description, onCancel, onC {contextHolder} {description &&
{description}
} - +
( @@ -130,6 +124,7 @@ const SpoolSelectModal: React.FC = ({ visible, description, onCancel, onC i18ncat: "spool", dataSource, tableState, + width: 80, })} {SpoolIconColumn({ id: "combined_name",