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

[TagInput] 扩展 collapsedItems 的删除功能 #2625

Closed
topaz-h opened this issue Nov 29, 2023 · 9 comments
Closed

[TagInput] 扩展 collapsedItems 的删除功能 #2625

topaz-h opened this issue Nov 29, 2023 · 9 comments
Labels
to be published fixed, not be published

Comments

@topaz-h
Copy link

topaz-h commented Nov 29, 2023

这个功能解决了什么问题

具有删除能力

image

但是不知道封装到内部还是把onClose方法抛出,可以给出建议吗?

你建议的方案是什么

  1. collapsedItems 参数增加遍历好的 Tag 列表,好处是可以复用 tag、closable、disabled、tagProps 等属性
  2. collapsedItems 参数增加 onClose 方法,外部自定义

建议采用哪一种方案呢?如果觉得方案可行,我愿意pr

Copy link
Contributor

👋 @topaz-h,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

Copy link
Contributor

♥️ 有劳 @LittlehorseXie 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @topaz-h

@NWYLZW
Copy link
Collaborator

NWYLZW commented Nov 29, 2023

增加遍历好的 tag 列表具体是指?

@topaz-h
Copy link
Author

topaz-h commented Nov 29, 2023

image 在 useTagList 抽离出来,遍历完成后加入到参数内部

@topaz-h
Copy link
Author

topaz-h commented Nov 29, 2023

image

最后大概是这样,我更倾向于把props和onClose当作参数返回

@HaixingOoO HaixingOoO added the 💭 discussion we are discussing label Nov 30, 2023
@topazur
Copy link

topazur commented Nov 30, 2023

image 两端不统一,那就按照vue这种方式传递,可以吗?

@uyarn
Copy link
Collaborator

uyarn commented Nov 30, 2023

@topaz-h vue是新增的API 这边接下来会同步跟进

topazur added a commit to topazur/tdesign-react-repo that referenced this issue Nov 30, 2023
topazur added a commit to topazur/tdesign-react-repo that referenced this issue Nov 30, 2023
@uyarn uyarn added to be published fixed, not be published and removed 💭 discussion we are discussing labels Dec 4, 2023
@uyarn
Copy link
Collaborator

uyarn commented May 16, 2024

published 1.7.1

@uyarn uyarn closed this as completed May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to be published fixed, not be published
Projects
None yet
Development

No branches or pull requests

5 participants