Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Table] table设置hideExpandedColumn={false} 第二个展示比第一个前面多了一个空白 #1556

Closed
1 task done
DaiQiangReal opened this issue Apr 18, 2023 · 2 comments · Fixed by #1564
Closed
1 task done
Labels
bug Something isn't working

Comments

@DaiQiangReal
Copy link
Collaborator

Is there an existing issue for this?

  • I have searched the existing issues

Which Component

table

Semi Version

latest

Current Behavior

table设置hideExpandedColumn={false} 第二个展示比第一个前面多了一个空白
img_v2_bc79a7dc-09aa-41f2-b66e-51707d8f7c5g

Expected Behavior

对齐第二个与第一个

Steps To Reproduce

No response

ReproducibleCode

import React from 'react';
import { Table } from '@ies/semi-ui-react';

const Demo = () => {
    const columns = [
        {
            title: 'Name',
            dataIndex: 'name',
            key: 'name',
        },
        {
            title: 'Age',
            dataIndex: 'age',
            key: 'age',
            width: 150,
        },
        {
            title: 'Address',
            dataIndex: 'address',
            key: 'address',
            width: 400,
        },
    ];

    const data = [
        {
            key: 1,
            name: 'John Brown sr.',
            age: 60,
            address: 'New York No. 1 Lake Park',
            children: [
                {
                    key: 11,
                    name: 'John Brown',
                    age: 42,
                    address: 'New York No. 2 Lake Park',
                },
                {
                    key: 12,
                    name: 'John Brown jr.',
                    age: 30,
                    address: 'New York No. 3 Lake Park',
                    children: [
                        {
                            key: 121,
                            name: 'Jimmy Brown',
                            age: 16,
                            address: 'New York No. 3 Lake Park',
                        },
                    ],
                },
                {
                    key: 13,
                    name: 'Jim Green sr.',
                    age: 72,
                    address: 'London No. 1 Lake Park',
                    children: [
                        {
                            key: 131,
                            name: 'Jim Green',
                            age: 42,
                            address: 'London No. 2 Lake Park',
                            children: [
                                {
                                    key: 1311,
                                    name: 'Jim Green jr.',
                                    age: 25,
                                    address: 'London No. 3 Lake Park',
                                },
                                {
                                    key: 1312,
                                    name: 'Jimmy Green sr.',
                                    age: 18,
                                    address: 'London No. 4 Lake Park',
                                },
                            ],
                        },
                    ],
                },
            ],
        },
        {
            key: 2,
            name: 'Joe Black',
            age: 32,
            address: 'Sidney No. 1 Lake Park',
        },
    ];

    return (
        <Table
         hideExpandedColumn={false}
            columns={columns}
            defaultExpandAllRows
            dataSource={data}
        />
    );
};

render(Demo);

Environment

- OS:
- browser:

Anything else?

No response

@pointhalo pointhalo added the bug Something isn't working label Apr 19, 2023
@shijiatongxue
Copy link
Collaborator

不好意思,没有看明白啥意思。

树形数据默认会分层展示,是说的这个吗?

@shijiatongxue
Copy link
Collaborator

不好意思,没有看明白啥意思。

树形数据默认会分层展示,是说的这个吗?

明白了。这里没对齐对吧。

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants