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

fix(bug): fix table height #2632

Closed
wants to merge 1 commit into from
Closed

fix(bug): fix table height #2632

wants to merge 1 commit into from

Conversation

labike
Copy link

@labike labike commented Jul 31, 2020

First of all, thank you for your contribution! 😄

New feature please send pull request to feature branch, and rest to master branch. Pull request will be merged after one of collaborators approve. Please makes sure that these form are filled before submitting your pull request, thank you!

[中文版模板 / Chinese template]

This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Branch merge
  • Other (about what?)

What's the background?

  1. Describe the source of requirement.
    当table的size属性发生变化时固定列的高度没有同步做出改变
  1. Resolve what problem.
    table size发生变化时让其固定列高度也随之调整
  1. Related issue link.
    When the size of the table changes from large to small, fixed columns cannot render correctly #1493

API Realization (Optional if not new feature)

  1. Basic thought of solution and other optional proposal.
    table syncFixedTableRowHeight方法中设置高度为'auto'
  1. List final API realization and usage sample.
  const fixedColumnsBodyRowsHeight = [].reduce.call(
        bodyRows,
        (acc, row) => {
            const rowKey = row.getAttribute('data-row-key');

            const height = 'auto';

            // const height =
           //   row.getBoundingClientRect().height ||
           //   state.fixedColumnsBodyRowsHeight[rowKey] ||
           //   'auto';
           acc[rowKey] = height;
           return acc;
        },
        {},
  );
  1. GIF or snapshot should be provided if includes UI/interactive modification.
    fixDemo

What's the effect? (Optional if not new feature)

  1. Does this PR affect user? Which part will be affected?
  2. What will say in changelog?
  3. Does this PR contains potential break change or other risk?

Changelog description (Optional if not new feature)

  1. English description
    when table fixed left or right and size change, fixed column height auto
  1. Chinese description (optional)
    当table列固定并且尺寸发生变化时固定列高度也随之改变

Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

Additional Plan? (Optional if not new feature)

If this PR related with other PR or following info. You can type here.

@labike labike closed this Aug 6, 2020
@labike labike deleted the fixTableHeight branch August 6, 2020 07:03
@labike labike restored the fixTableHeight branch August 6, 2020 07:06
@labike labike reopened this Aug 6, 2020
@labike labike closed this Aug 6, 2020
@labike labike deleted the fixTableHeight branch August 6, 2020 07:18
@labike labike restored the fixTableHeight branch August 6, 2020 07:25
@labike labike reopened this Aug 6, 2020
@labike
Copy link
Author

labike commented Aug 6, 2020

误删分支

tangjinzhou pushed a commit that referenced this pull request Aug 19, 2020
@tangjinzhou
Copy link
Member

716f32d

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants