maxmarcon / live_select

Dynamic (multi)selection field for LiveView
https://hex.pm/packages/live_select
Apache License 2.0
185 stars 35 forks source link

extending use case with slots. #23

Closed TwistingTwists closed 1 year ago

TwistingTwists commented 1 year ago

image

This is a sample image / modal / dropdown that I want to display with live_select.

live_select has lots of 'keyboard' bindings and small things done right! I wish to support live_select with slots so that a custom slot can be passed for options / dropdown.

Would love you know your thoughts on this @maxmarcon .

maxmarcon commented 1 year ago

So you would like to display that huge UI as an option in the dropdown? :)

Live select already supports slots, I'm sure you have noticed.

I guess what you want to do is possible in principle: you make sure that your live_select_change returns one entry, and you populate the content of the :option slot depending on the entry. It might work, but maybe it will require some styling work to make it look decent

TwistingTwists commented 1 year ago

Oh. So, few options might need to be styled differently!

That makes sense. Thanks for the heads up!