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

grid列筛选器如果使用关联字段有问题 #5830

Open
SiGool opened this issue Oct 9, 2023 · 0 comments
Open

grid列筛选器如果使用关联字段有问题 #5830

SiGool opened this issue Oct 9, 2023 · 0 comments

Comments

@SiGool
Copy link

SiGool commented Oct 9, 2023

  • Laravel Version: v5.5.50
  • PHP Version: 7.4.3
  • Laravel-admin: v1.8.19

Description:

image
adminUser.name 会转成 grid column对象列名属性值为:admin_user.name

image

列筛选器渲染, 会直接使用列名:admin_user.name ,request('admin_user.name')

但是当列筛选器提交筛选时,因为PHP原因,把 admin_user.name 自动转成 admin_user_name了。
就是说会自动将关联表达的 . 转成 _ 了

导致PHP筛选接收筛选参数出现问题,以下:

image

这里依然从 admin_user.name 获取,可是已经自动转成 admin_user_name了,就会获取不到

image
获取不到筛选值为空,这里直接返回了,应用不到那方的筛选

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