Client: Fixed spool select table formatting
This commit is contained in:
@@ -23,6 +23,7 @@ interface BaseColumnProps<Obj> {
|
||||
i18nkey?: string;
|
||||
dataSource: Obj[];
|
||||
tableState: TableState;
|
||||
width?: number;
|
||||
}
|
||||
|
||||
interface FilteredColumnProps {
|
||||
@@ -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;
|
||||
|
||||
@@ -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) => (
|
||||
@@ -130,6 +124,7 @@ const SpoolSelectModal: React.FC<Props> = ({ visible, description, onCancel, onC
|
||||
i18ncat: "spool",
|
||||
dataSource,
|
||||
tableState,
|
||||
width: 80,
|
||||
})}
|
||||
{SpoolIconColumn({
|
||||
id: "combined_name",
|
||||
|
||||
Reference in New Issue
Block a user