Skip to content

Commit fd7ffbc

Browse files
author
hocgin
committed
dev
1 parent 3979ccf commit fd7ffbc

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

src/Promise/components/Schema/TableSchemaConfig/table-schema.tsx

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
import React, { useContext } from 'react';
22
import ProProvider from '@ant-design/pro-provider';
33
import ProTable from '@ant-design/pro-table';
4-
import {
5-
SchemeColumns,
6-
handleSchemeColumns,
7-
} from '../scheme';
4+
import { SchemeColumns, handleSchemeColumns } from '../scheme';
85
import { ProTableProps } from '@ant-design/pro-table/lib/typing';
96

10-
interface TableSchemaProps extends ProTableProps<any, any, any> {
11-
}
7+
interface TableSchemaProps extends ProTableProps<any, any, any> {}
128

139
// @formatter: off
1410
const ArchiveSchema: React.FC<TableSchemaProps> = ({
15-
columns = [],
16-
rowKey,
17-
children,
18-
...rest
19-
}) => {
11+
columns = [],
12+
rowKey,
13+
children,
14+
...rest
15+
}) => {
2016
// @formatter: on
2117
const values = useContext(ProProvider);
2218
let value = {
@@ -29,10 +25,13 @@ const ArchiveSchema: React.FC<TableSchemaProps> = ({
2925

3026
return (
3127
<ProProvider.Provider value={value}>
32-
<ProTable rowKey={rowKey || 'id'}
33-
search={search}
34-
columns={handleSchemeColumns(columns)}
35-
{...rest}>
28+
<ProTable
29+
rowKey={rowKey || 'id'}
30+
search={search}
31+
tableStyle={{ overflowX: 'auto' }}
32+
columns={handleSchemeColumns(columns)}
33+
{...rest}
34+
>
3635
{children}
3736
</ProTable>
3837
</ProProvider.Provider>

0 commit comments

Comments
 (0)