select-list-card icon indicating copy to clipboard operation
select-list-card copied to clipboard

Request: default toggled state, based on list item count

Open nagyrobi opened this issue 4 years ago • 3 comments

I like the toggle on the top where you can close the list and only the title is shown. It would be useful to have an option to set it as default closed when the page is loaded.

Also maybe an option to close it automatically when the number of items in the list is less then a value, and open it when it's more than a value. This is useful for cases when the input select contents are dynamically populated: for example usually the list is empty (or only containing a single item called <none>) when there's no USB stick inserted in the media player. But as long as someone inserts a USB stick with MP3 files in the media player, the list gets automatically filled with a file list, then it should optionally open.

nagyrobi avatar Jul 20 '20 20:07 nagyrobi

Good idea, the main reason I developed this card has a similar use case as yours. When I select a spotify playlist in another select it fills the card with all the tracks for that playlist.

Too make sure the card doesn't get inaccessible with auto close/open the header with toggle should always be visible when this setting is enabled.

BTW Thanks for mentioning the card from your linkplay repo!

mattieha avatar Jul 21 '20 16:07 mattieha

Well seeing this card made me develop that functionality in linkplay!

nagyrobi avatar Jul 21 '20 16:07 nagyrobi

I would also like the ability to default the toggle to closed. My use case is a list of movies dynamically set from those available on my Kodi media player. The selected value is the next "feature movie" to be shown, and it would be nice not to accidentally change the value because the list is open :-)

Thanks for this card, I was struggling to find a solution to the above without it!

jkfranks9 avatar Feb 05 '21 13:02 jkfranks9