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(Table): 编辑弹窗按 Order 值排列 #2213

Closed
1 task done
densen2014 opened this issue Oct 4, 2023 · 7 comments · Fixed by #2223
Closed
1 task done

feat(Table): 编辑弹窗按 Order 值排列 #2213

densen2014 opened this issue Oct 4, 2023 · 7 comments · Fixed by #2223
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@densen2014
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

No response

Describe the solution you'd like

F3}68M9G_2PI}7ZGZY)@(BW

Table组件中,Order 值在列表中,按 正、0、负 的顺序显示。
在新建编辑弹窗中,按 负、0、正 的顺序显示。
这2个地方,显示顺序能不能搞成一致的啊

Additional context

No response

@densen2014 densen2014 added bug Something isn't working enhancement New feature or request labels Oct 4, 2023
@bb-auto
Copy link

bb-auto bot commented Oct 4, 2023

@densen2014 Thank you for contacting us. We will give feedback later.

@bb-auto bb-auto bot added this to the V7.11.0 milestone Oct 4, 2023
@densen2014 densen2014 self-assigned this Oct 4, 2023
@densen2014
Copy link
Member Author

我来安排

@ArgoZhang ArgoZhang changed the title feat: <Table> 编辑弹窗按 Order 值排列 feat(Table): 编辑弹窗按 Order 值排列 Oct 4, 2023
@ArgoZhang
Copy link
Collaborator

ArgoZhang commented Oct 4, 2023

@densen2014 感觉应该 倒序排序即可目前是一个奇怪的逻辑

return cols.Where(a => a.Order > 0).OrderBy(a => a.Order)
.Concat(cols.Where(a => a.Order == 0))
.Concat(cols.Where(a => a.Order < 0).OrderBy(a => a.Order));

@densen2014
Copy link
Member Author

@densen2014 感觉应该 倒序排序即可目前是一个奇怪的逻辑

return cols.Where(a => a.Order > 0).OrderBy(a => a.Order)
.Concat(cols.Where(a => a.Order == 0))
.Concat(cols.Where(a => a.Order < 0).OrderBy(a => a.Order));

之前是我提交的,逻辑没毛病的。

@ArgoZhang
Copy link
Collaborator

可以精简为 OrderByDescending(i => i.Order) 即可啊

@densen2014
Copy link
Member Author

负数越大越在后面,是分开排序的

@ArgoZhang
Copy link
Collaborator

ArgoZhang commented Oct 4, 2023

懂了 1, 2, 3, 0, -3, -2, -1 排序规则,真变态

@ArgoZhang ArgoZhang added enhancement New feature or request and removed enhancement New feature or request bug Something isn't working labels Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants