Skip to content

Commit

Permalink
docs(useAntdTable&useDynamicList): table style overflow auto (#2438)
Browse files Browse the repository at this point in the history
  • Loading branch information
coding-ice authored Jan 28, 2024
1 parent 3b2c058 commit d6b9bb0
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/hooks/src/useAntdTable/demo/cache.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const UserList = () => {
return (
<div>
{type === 'simple' ? searchForm : advanceSearchForm}
<Table columns={columns} rowKey="email" {...tableProps} />
<Table columns={columns} rowKey="email" style={{ overflow: 'auto' }} {...tableProps} />

<div style={{ background: '#f5f5f5', padding: 8 }}>
<p>Current Table:</p>
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/src/useAntdTable/demo/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default () => {
return (
<div>
{type === 'simple' ? searchForm : advanceSearchForm}
<Table columns={columns} rowKey="email" {...tableProps} />
<Table columns={columns} rowKey="email" style={{ overflow: 'auto' }} {...tableProps} />

<div style={{ background: '#f5f5f5', padding: 8 }}>
<p>Current Table:</p>
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/src/useAntdTable/demo/init.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export default () => {
return (
<div>
{type === 'simple' ? searchForm : advanceSearchForm}
<Table columns={columns} rowKey="email" {...tableProps} />
<Table columns={columns} rowKey="email" style={{ overflow: 'auto' }} {...tableProps} />

<div style={{ background: '#f5f5f5', padding: 8 }}>
<p>Current Table:</p>
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/src/useAntdTable/demo/ready.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export default () => {
<div>
<Button onClick={() => setReady((r) => !r)}>toggle ready</Button>
{type === 'simple' ? searchForm : advanceSearchForm}
<Table columns={columns} rowKey="email" {...tableProps} />
<Table columns={columns} rowKey="email" style={{ overflow: 'auto' }} {...tableProps} />

<div style={{ background: '#f5f5f5', padding: 8 }}>
<p>Current Table:</p>
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/src/useAntdTable/demo/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ export default () => {
},
];

return <Table columns={columns} rowKey="email" {...tableProps} />;
return <Table columns={columns} rowKey="email" style={{ overflow: 'auto' }} {...tableProps} />;
};
2 changes: 1 addition & 1 deletion packages/hooks/src/useAntdTable/demo/validate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default () => {
return (
<div>
{searchForm}
<Table columns={columns} rowKey="email" {...tableProps} />
<Table columns={columns} rowKey="email" style={{ overflow: 'auto' }} {...tableProps} />

<div style={{ background: '#f5f5f5', padding: 8 }}>
<p>Current Table:</p>
Expand Down
1 change: 1 addition & 0 deletions packages/hooks/src/useDynamicList/demo/demo4.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export default () => {
dataSource={list}
rowKey={(r: Item, index: number) => getKey(index).toString()}
pagination={false}
style={{ overflow: 'auto' }}
/>
</ReactDragListView>
</Form>
Expand Down

0 comments on commit d6b9bb0

Please sign in to comment.