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

feat: support to set the folderTree nodes whether to sort by default #614

Merged
merged 3 commits into from
Jan 13, 2022

Conversation

kiwiwong
Copy link
Collaborator

@kiwiwong kiwiwong commented Jan 11, 2022

Description

FolderTree's sorting function changed to configurable.
FolderTree.update supports updating the node whose id is 0.

Fixes #582
Fixes #604

Changes

  • Add the autoSort property to control whether to sort, and the default value is false.
  • Add the toggleAutoSort method to toggle the value of autoSort.
  • The update method supports updating the node whose id is 0.

@kiwiwong kiwiwong added the bug Something isn't working label Jan 11, 2022
@kiwiwong kiwiwong added this to the Next Version milestone Jan 11, 2022
@kiwiwong kiwiwong self-assigned this Jan 11, 2022
@codecov
Copy link

codecov bot commented Jan 11, 2022

Codecov Report

Merging #614 (5562f4f) into main (bfdf0bb) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #614      +/-   ##
==========================================
+ Coverage   88.88%   88.90%   +0.01%     
==========================================
  Files         185      185              
  Lines        5409     5418       +9     
  Branches     1218     1222       +4     
==========================================
+ Hits         4808     4817       +9     
  Misses        593      593              
  Partials        8        8              
Impacted Files Coverage Δ
src/model/workbench/explorer/folderTree.tsx 92.59% <100.00%> (+0.59%) ⬆️
...c/services/workbench/explorer/folderTreeService.ts 99.41% <100.00%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bfdf0bb...5562f4f. Read the comment docs.

Copy link
Collaborator

@wewoor wewoor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

另外,FolderTree 排序的,之前是个默认特性,现在可选的设计,还是有必要解释下的。
https://dtstack.github.io/molecule/docs/guides/extend-builtin-ui#foldertree

@kiwiwong
Copy link
Collaborator Author

另外,FolderTree 排序的,之前是个默认特性,现在可选的设计,还是有必要解释下的。 https://dtstack.github.io/molecule/docs/guides/extend-builtin-ui#foldertree

已在next版本文档中添加了说明

@wewoor wewoor changed the title fix: folderTree sort feat: support to set the folderTree nodes whether to sort by default Jan 12, 2022
Copy link
Collaborator

@mortalYoung mortalYoung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Collaborator

@wewoor wewoor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@wewoor wewoor merged commit 99754f9 into main Jan 13, 2022
@wewoor wewoor deleted the fix/folderTree-sort branch January 13, 2022 02:20
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 this pull request may close these issues.

FolderTree.update not support updating the node that id is 0 bug: folderTree sort
3 participants