Skip to content

Commit

Permalink
Client: Fixed spool select table formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Donkie committed Sep 16, 2023
1 parent 9c2504d commit 58fdbb4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 4 additions & 0 deletions client/src/components/column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ interface BaseColumnProps<Obj> {
i18nkey?: string;
dataSource: Obj[];
tableState: TableState;
width?: number;
}

interface FilteredColumnProps {
Expand Down Expand Up @@ -54,6 +55,9 @@ function Column<Obj>(props: BaseColumnProps<Obj> & 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;
Expand Down
9 changes: 2 additions & 7 deletions client/src/components/spoolSelectModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,7 @@ const SpoolSelectModal: React.FC<Props> = ({ visible, description, onCancel, onC
{contextHolder}
<Space direction="vertical" style={{ width: "100%" }}>
{description && <div>{description}</div>}
<Table
{...tableProps}
rowKey="id"
dataSource={dataSource}
pagination={false}
scroll={{ x: "max-content", y: 200 }}
>
<Table {...tableProps} rowKey="id" dataSource={dataSource} pagination={false} scroll={{ y: 200 }}>
<Table.Column
width={50}
render={(_, item: ISpool) => (
Expand All @@ -130,6 +124,7 @@ const SpoolSelectModal: React.FC<Props> = ({ visible, description, onCancel, onC
i18ncat: "spool",
dataSource,
tableState,
width: 80,
})}
{SpoolIconColumn({
id: "combined_name",
Expand Down

0 comments on commit 58fdbb4

Please sign in to comment.