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

Possibility argument issue for function searchHandler #53

Open
pzgz opened this issue Sep 1, 2019 · 1 comment
Open

Possibility argument issue for function searchHandler #53

pzgz opened this issue Sep 1, 2019 · 1 comment

Comments

@pzgz
Copy link
Contributor

pzgz commented Sep 1, 2019

Please check the line above, I think we might have issue with this function. Since dataChangeHandler method is expecting query parameters. But if seachHandler was called by parameter resetPageIndex, arguments[0]' will be the value for resetPageIndex. Therefore, dataChangeHandler` method call never can get the query parameters.

Simply said, that's no way to call searchHandler with both resetPageIndex set to false and query parameter object pass in

@pzgz
Copy link
Contributor Author

pzgz commented Sep 1, 2019

实际上,我是在尝试修改这个插件来支持一个返回到列表页面时能够恢复之前做的搜索结果,包括查询条件,分页情况和排序情况时发现这个问题的。

这个问题目前我已经能够绕过去,在给自定义的查询表单设置初始值的时候,同时要把初始条件设置到组件的params上,上面的这个问题就无所谓了。使用组件内带的搜索表单应该没有问题。可能需要在说明里面写一下,如果使用form 插槽来实现自定义的搜索表单,还需要考虑到初始值的时候,除了自己需要考虑搜索表单初始化的同时,也切记要设置组件的params参数。

另外我修改了这个组件并增加了初始pageSize和和初始pageIndex的设置,来允许组件加载数据的时候直接按照设定的分页数量来分页并前往指定的页面,如果可以的话,我提一个PR。

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

1 participant