benjamincanac / ui3

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
https://ui.nuxt.com
MIT License
52 stars 7 forks source link

[InputMenu/Select/SelectMenu] Find a way to easily display the selected item `icon` / `avatar` / `chip` #96

Closed benjamincanac closed 2 months ago

benjamincanac commented 6 months ago

Description

Reverted this behaviour in https://github.com/benjamincanac/ui3/pull/92/commits/94fcf28a8a1344d5ea9d67809e61f0e5c80577ed. It was causing too many conflicts with leading / trailing and with display priority.

For example if we provide an icon, select an item with an avatar then set loading to true. How to choose to display the (loading) icon instead of the avatar? 🤔

benjamincanac commented 6 months ago

Here is how to achieve this at the moment: https://github.com/benjamincanac/ui3/blob/dev/playground/pages/input-menu.vue#L53-L70. Maybe it's good enough.