We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Vben Admin V5
翻阅了vxe的文档,没有得到较好的答案。这里是需要自己去维护sort的状态吗?但是并没有找到更新sort状态的方法。尝试使用sortConfig.defaultSort 去更新状态, 每次需要强制重新渲染表格才生效,且卡顿明显,应该不是正确的方案。请问这种情况如何处理呢?
const gridEvents = { sortChange: async (sort) => { sortParams[${sort.field}Sort] = sort.order === 'desc'; } };
const gridEvents = { sortChange: async (sort) => { sortParams[
] = sort.order === 'desc'; } };
System: OS: macOS 14.5 CPU: (10) arm64 Apple M1 Pro Memory: 119.33 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 21.0.0 - /usr/local/bin/node npm: 10.2.0 - /usr/local/bin/npm pnpm: 9.14.4 - /usr/local/bin/pnpm Browsers: Chrome: 131.0.6778.109 Safari: 17.5
No response
The text was updated successfully, but these errors were encountered:
查阅vxeTable文档,默认情况下,刷新按钮调用的是reload,这会重置排序、筛选以及当前页数等信息。如果你只需要刷新,配置数据里将toolbarConfig的refresh.code配置为query
Sorry, something went wrong.
我这边尝试了2种方式。 1: 配置sortChange 通过 gridApi?.query()触发后端排序; 2: 配置proxyConfig.sort 直接在ajax的query函数中加入后端排序逻辑 但是数据回来了以后高亮均被重置,可以观察到点击后本是高亮的,数据一刷新就被重置了
找到问题了 是因为我每次查询都要动态更新列 导致状态被重置了
目前我这边每次发起表格数据的请求都要动态的构造表格列gridApi.setGridOptions,一旦columns被更新,选中状态就被重置了。vxe我看完了也没发现可以手动控制sort状态的API。不知道对于这种情况大佬这边有什么解决办法吗? @mynetfan
gridApi.setGridOptions
No branches or pull requests
Version
Vben Admin V5
Describe the bug?
翻阅了vxe的文档,没有得到较好的答案。这里是需要自己去维护sort的状态吗?但是并没有找到更新sort状态的方法。尝试使用sortConfig.defaultSort 去更新状态, 每次需要强制重新渲染表格才生效,且卡顿明显,应该不是正确的方案。请问这种情况如何处理呢?
Reproduction
const gridEvents = { sortChange: async (sort) => { sortParams[
${sort.field}Sort] = sort.order === 'desc'; } };
System Info
Relevant log output
No response
Validations
The text was updated successfully, but these errors were encountered: