[Feature Request]: MultiInput Tokens could be not-removable

未关闭
#12,290 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
typescript
领域
frontend

调研方向

Start by reading the Token and MultiInput component implementations and how tokens are rendered in the More popover. Define the optional non-removable behavior across the dismiss icon, backspace handling, ordering, and popover presentation. Done means one token can remain protected while other tokens remain removable, including in the proposed Recipients use case.

由索引模型根据 Issue 内容生成。

描述

Design Pending feature request Medium Prio SAP SF TOPIC RL
Feature Request Description

The <Token> web component passed to <MultiInput> can sometimes not be removed at all. For example, a use case came up for a "Recipients" field where the first recipient is not removable, but any of the other recipients are removable. This is different from a read only multi input where all tokens are not removable.

Proposed Solution

Have a boolean property on Token like "not-removable" or some other similarly named property that is optional and when supplied will trigger the changes:

  1. Token no longer has a clickable X (dismiss) icon
  2. Token might need to be listed first so as not to block backspace on the other items, also backspace will not delete it
  3. Token when showing in the More popover should not have an X button or it should be disabled.
Proposed Alternatives

We can get close to this by implementing the React code such that the closeIcon is an empty icon, with an onClick that stops propogation, however, this has a couple of issues for example the more popup still shows it as removable since the closeIcon doesn't get used there.

We can also filter out the non-removable items entirely and show them in a separate place somehow or make it implied (e.g. a note that says the recipients always includes the author or something else). But this requires a change to the design.

Organization

SuccessFactors

Additional Context

No response

Priority

Medium

Privacy Policy
  • I’m not disclosing any internal or sensitive information.
主要语言
TypeScript
星标
1.8k
派生
290
平均合并
2 天 13 小时
30 天内合并 PR
50

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

UI5/webcomponents 的其他 Issue

查看 UI5/webcomponents 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。