Closed Gamehu closed 3 years ago
版本升级到0.1.7后,重置问题还是存在
package.json
"@ahooksjs/next-form-table": "^0.1.7", "@ahooksjs/use-adapt-plugin": "^0.1.7", "@ahooksjs/use-async-default-plugin": "^0.1.7", "@ahooksjs/use-filter-plugin": "^0.1.7", "@ahooksjs/use-selection-plugin": "^0.1.7", "@ahooksjs/use-sortable-plugin": "^0.1.7", "@ahooksjs/use-tree-plugin": "^0.1.7",
codesandbox
demo
感觉这个内置做不太好,因为如果有两个字段需要 filter,这个时候重置某一个之后,我这边不清楚你设置的 transformer 的处理逻辑是什么,可能会把一些不必要的数据给情况掉了。所以加上 transformer 之后,你需要自己控制数据。
你加上 transformer 的使用场景是需要要加上另外参数还是想改变传给后端参数 key 名而已?
改变传给后端参数 key 名,可以参考 https://github.com/ahooksjs/useTable/blob/master/packages/use-filter-plugin/demo/transformer.tsx
版本升级到0.1.7后,重置问题还是存在
package.json
codesandbox
demo