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

select 的 fieldSelector 查询有问题 #6589

Closed
chengzhongxue opened this issue Sep 4, 2024 · 6 comments · Fixed by #6591
Closed

select 的 fieldSelector 查询有问题 #6589

chengzhongxue opened this issue Sep 4, 2024 · 6 comments · Fixed by #6591
Assignees
Labels
area/ui Issues or PRs related to the Halo UI kind/improvement Categorizes issue or PR as related to a improvement.
Milestone

Comments

@chengzhongxue
Copy link
Contributor

系统信息

使用的哪种方式运行?

Docker

发生了什么?

8583224fba2eec2a4a24068d681b1c8
如果 valueField 设置 user.metadata.name 就会出现一下情况
2d041fdcde80caa652c64df135a298d

复现步骤

No response

相关日志输出

No response

附加信息

No response

@JohnNiang
Copy link
Member

Hi @chengzhongxue ,从官方文档来看,应该是错误描述了 valueField 的值,这里尝试设置为 metadata.name 试试呢。

另外,请 @LIlGG 帮忙确认一下这里具体应该传入什么值?

/kind bug
/area ui

@f2c-ci-robot f2c-ci-robot bot added kind/bug Categorizes issue or PR as related to a bug. area/ui Issues or PRs related to the Halo UI labels Sep 5, 2024
@LIlGG
Copy link
Member

LIlGG commented Sep 5, 2024

目前这里的值取的是 valueField 的值,可以额外增加一个参数用于解决此问题。

不过对于用户列表的查询,Halo 默认提供了 userSelect 这个 formkit 组件,可以直接使用。

@LIlGG LIlGG added kind/improvement Categorizes issue or PR as related to a improvement. and removed kind/bug Categorizes issue or PR as related to a bug. labels Sep 5, 2024
@LIlGG
Copy link
Member

LIlGG commented Sep 5, 2024

/assign

@chengzhongxue
Copy link
Contributor Author

目前这里的值取的是 valueField 的值,可以额外增加一个参数用于解决此问题。

不过对于用户列表的查询,Halo 默认提供了 userSelect 这个 formkit 组件,可以直接使用。

这个支持多选?

@LIlGG
Copy link
Member

LIlGG commented Sep 5, 2024

这个支持多选?

默认支持多选,你也可以使用大部分支持 Select 的参数,因为它就是通过 Select 实现的。

@chengzhongxue
Copy link
Contributor Author

这个支持多选?

默认支持多选,你也可以使用大部分支持 Select 的参数,因为它就是通过 Select 实现的。

好的

@JohnNiang JohnNiang added this to the 2.20.x milestone Sep 5, 2024
f2c-ci-robot bot pushed a commit that referenced this issue Sep 6, 2024
…specific field (#6591)

#### What type of PR is this?

/kind improvment
/area ui
/milestone 2.20.x

#### What this PR does / why we need it:

为 Formkit Select 组件增加 `fieldSelectorKey` 字段,用于在使用 `fieldSelector` 字段远程查询时,指定查询所使用的 Key。

例如指定 `fieldSelectorKey` 为 `metadata.name` 则接口调用时的参数为 `fieldSelector: metadata.name=(admin)`。

#### How to test it?

测试在远程搜索时,`fieldSelector` 的查询 key 是否为设置的内容。

#### Which issue(s) this PR fixes:

Fixes #6589 

#### Does this PR introduce a user-facing change?
```release-note
为 Formkit Select 组件远程查询增加指定 Key 的字段。
```
@ruibaby ruibaby modified the milestones: 2.20.x, 2.20.0 LTS Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui Issues or PRs related to the Halo UI kind/improvement Categorizes issue or PR as related to a improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants