-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Selected item slot for Select component #223
Comments
Adding too much specify slot api is not a good pattern. Naive UI prefers slots for display-only slot such as |
I've digged into code all I need is to customize Also you said |
I mean it doesn't mix too much logic (with complex slot props) in it. Since Vue doesn't has good typescript support for slots. I think it is dangerous to rely too much on slots now (nor API and implementation may break a lot if vue change its API). However the feature will be provided (not by slot api). It's necessary. |
I don't think the API is gonna change as vue is in stable release now, though it was discussed a lot in RFCs. As a consumer it would be great to have more slot oriented customization. Please consider using slots more. Anyway, thank you for your work naive-ui is really great framework, I liked it a lot so far. |
Thanks! I know many people perfer slot API (if it is typed, I would too). However now the typed slot rfc is still pending (the same for generic types), I think it's risky to implement it before the rfc is merged. If there're some changes, it will cost a lot to change all the related codes. |
This function solves the problem
It would be great to have
selected-item
(or any other name) slot to improve customization of selected value.Expected API
Also instead of
render-label
property, it would be great to have scoped slot as I think it is more suitable for Vue. Having prop to customize render is kind of React thing.The text was updated successfully, but these errors were encountered: