pro-components icon indicating copy to clipboard operation
pro-components copied to clipboard

🧐[问题]如何在request外部获取当前proTable的filter参数?

Open jianmaikj opened this issue 3 years ago • 1 comments

提问前先看看:

https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md

🧐 问题描述

如何在request外部获取当前proTable的filter参数? 有些情况需要手动请求,需要用获取当前的筛选参数

💻 示例代码

🚑 其他信息

jianmaikj avatar Sep 08 '22 09:09 jianmaikj

protable 有个 formRef属性,参考 https://procomponents.ant.design/components/table#%E9%80%9A%E8%BF%87-formref-%E6%9D%A5%E6%93%8D%E4%BD%9C%E6%9F%A5%E8%AF%A2%E8%A1%A8%E5%8D%95 通过formRef.current.getFieldsValue拿到参数

wangmeijian avatar Sep 08 '22 11:09 wangmeijian

最好的办法是用antd的用法, 通过state自己去存

chenshuai2144 avatar Dec 26 '22 11:12 chenshuai2144