tusen-ai / naive-ui

A Vue 3 Component Library. Fairly Complete. Theme Customizable. Uses TypeScript. Fast.
https://www.naiveui.com
MIT License
16.05k stars 1.67k forks source link

NPopselect lake a lot of props from NSelect #3795

Open M1CK431 opened 2 years ago

M1CK431 commented 2 years ago

This function solves the problem (这个功能解决的问题)

For example, when data come from API, there are some very handy props like label-field or value-field which are not available.

Expected API (期望的 API)

At a first look, the following props are concerned: children-field, default-value, label-field, menu-props, render-option, reset-menu-on-options-change, value-field and there is also on-scroll event.

07akioni commented 2 years ago

We don't expect popselect to be that complex currently.

M1CK431 commented 2 years ago

I was thinking Popselect as a "wrapper" for regular Select, with a different behavior regarding it's trigger. By your response, I understand that I was wrong :disappointed:

In my project I only need label-field and value-field currently. For now I just .map data from API so it's not a big deal. However, I guess that props could be useful for others and so perhaps it will be possible to add them in the futur?

codeinfo commented 2 years ago

使用select tag标签,内容为object, 目前仅支持string, 以后有考虑添加对象支持么

jahnli commented 7 months ago

This issue does not have any recent activity. If you are still experiencing similar problems, open a new error, including a minimal copy of the problem

M1CK431 commented 7 months ago

@jahnli reading your comment, it's obvious that you don't read this issue carefully. Or perhaps you are a bot? 🤭 It's not an error but a feature request which is not implemented for now. See here for the reason why: https://github.com/tusen-ai/naive-ui/issues/3795#issuecomment-1264655497

jahnli commented 7 months ago

The problem is already swamped, and if you really need it, I think reopening a problem will make more people see it and want to add it

@jahnli看了你的评论,很明显你没有仔细阅读这个问题。或者也许你是一个机器人?🤭 这不是一个错误,而是一个功能请求,目前尚未实现。原因请参见此处:#3795(评论)

M1CK431 commented 7 months ago

I strongly disagree 😞

jahnli commented 7 months ago

At present, the problem has been submerged, I personally think that only by re-opening a problem can more people see it and be willing to add it. If this problem is closed, I am very sorry and I will re-open it