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: crud2编辑器提示卡死问题修复、table2 autoFillHeight属性支持滚动 #8763

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

wanglinfang2014
Copy link
Collaborator

@wanglinfang2014 wanglinfang2014 commented Nov 16, 2023

What

🤖[deprecated] Generated by Copilot at 7b50e75

This pull request enhances the table components in amis-ui and amis by optimizing the height adjustment, data source comparison, and rendering logic. It fixes a bug that caused unnecessary re-rendering of Table2 and removes redundant code.

🤖[deprecated] Generated by Copilot at 7b50e75

Table height adjusts
No more timer or timeout
Autumn leaves fall fast

Why

How

🤖[deprecated] Generated by Copilot at 7b50e75

  • Remove the timer property and the delayed execution of the updateAutoFillHeight method in the Table class (link, link)
  • Call the updateAutoFillHeight method more frequently and conditionally based on the autoFillHeight prop and the dataSource state in the Table class (link, link)
  • Remove the style attribute and set the overflow style of the tableContent element in the updateAutoFillHeight method in the Table class, to adjust the table height and enable the scrollbars (link, link)
  • Import and use the isEqual function from the lodash library to compare the data sources for the table store in the CRUD2 component (link, link)
  • Use the join method to convert the arrays of keys to strings in the reaction functions for the currentSelectedRowKeys and currentExpandedKeys observables in the Table2 component, to avoid unnecessary reactions (link, link)

@github-actions github-actions bot added the fix label Nov 16, 2023
Copy link

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

@lurunze1226 lurunze1226 merged commit e3ebd97 into baidu:master Nov 16, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants