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

[Question]如何实现在筛选时多个字段的联动 #600

Open
Gowa2017 opened this issue Jan 28, 2024 · 1 comment
Open

[Question]如何实现在筛选时多个字段的联动 #600

Gowa2017 opened this issue Jan 28, 2024 · 1 comment

Comments

@Gowa2017
Copy link
Contributor

Description [describe your questions]

比如现在我有一两个概念,

  • 分组
  • 分区,一个分组下有多个分区

但我在进行筛选的时候,我可以使用 AddTableOptions 来从数据库获取到分组信息。但是我无法实现选择了分组的时候自动过滤出分组下的分区信息。

Example code [If you have any code info]

	info.AddField("分组", "gid", db.Int).
		FieldHide().
		FieldFilterable(types.FilterType{FormType: form.SelectSingle}).
		FieldFilterOptionsFromTable("group", "name", "id")
	info.AddField("分区", "zid", db.Int).
        FieldHide().
		FieldFilterable(types.FilterType{FormType: form.SelectSingle}).
		FieldFilterOptionsFromTable("zone", "name", "id")

Others [screenshots or other info]

@chenhg5
Copy link
Collaborator

chenhg5 commented Apr 6, 2024

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