baidu / baidu/amis

selectMode=“table”的select配合searchApi使用时,选完后select里有时显示value有时显示label

Open
#4,030 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

need confirm
Dominant language
TypeScript
Stars
18.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

描述问题:

{
"type": "select",
"name": "poetry_id",
"searchable": true,
"selectMode": "table",
"clearable": true,
"label": "关联诗词",
"required": true,
"columns": [
{
"name": "label",
"label": "诗词"
}
],
"searchApi": "",
"source": "
"
}

这样一个select,接口按照规范返回了options,里面每个对象包含label和value两个字段。但是我发现搜索然后点击一个选项后,有的时候select里显示的是label字段的内容,有的时候又显示的value字段的内容。已经F12确认过每次接口都有返回value和label。

如何复现(请务必完整填写下面内容):
  1. 你是如何使用 amis 的?
    如上

  2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在
    1.8.0

  3. 粘贴有问题的完整 amis schema 代码:

如上
  1. 操作步骤
    如上

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the provided select schema, focusing on the searchable table-mode select after selecting an option returned by searchApi. Trace how the selected option's label and value are rendered, then verify that repeated searches and selections consistently display the intended field.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.