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

可以考虑提供个钩子 #21

Closed
henryzp opened this issue Sep 13, 2022 · 5 comments
Closed

可以考虑提供个钩子 #21

henryzp opened this issue Sep 13, 2022 · 5 comments

Comments

@henryzp
Copy link

henryzp commented Sep 13, 2022

就是在拖拽列完成后,能有一个事件,参数是当前列的宽度,能让我ajax发起请求,保存到后端

简单地说,就是实现自定义列的功能,下次这个用户再次登录这个页面,某一列的宽度还是他最后一次改动的宽度

@hemengke1997
Copy link
Owner

有持久化拖拽宽度的选项,是否能满足你的需求呢

@henryzp
Copy link
Author

henryzp commented Sep 15, 2022

额,必然不能啊。。。

像toB的项目,就是saas定制化的,每个人期望自己的table列宽可能都不一样的。。。我们之前用react-base-table有实现这样的功能,所以期望有这样的功能。。

那么我就可以放弃react-base-table了,转用antd的table,结合你的这个hooks,就完美了

@hemengke1997
Copy link
Owner

我的理解 columnsState 选项是可以满足你的需求的,你可以看看
https://github.com/hemengke1997/use-antd-resizable-header/blob/master/src/useAntdResizableHeader.tsx#L17

如果满足不了的话,我再考虑加个回调事件

@henryzp
Copy link
Author

henryzp commented Sep 15, 2022 via email

@hemengke1997
Copy link
Owner

closed on 2.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants