rob-balfre / svelte-select

Svelte Select. A select component for Svelte
https://svelte-select-examples.vercel.app
Other
1.26k stars 175 forks source link

How to add a fixed custom item at the bottom #435

Open eriknyk opened 1 year ago

eriknyk commented 1 year ago

How to add a fixed custom item at the bottom, this is useful to add custom actions, by example if we have a user list, and there is not any suggestion for a given username we can offer create it as an extra action.

Or in the below example, there is a clear action.

Screen Shot 2022-07-14 at 18 40 48

Best Regards.

rob-balfre commented 1 year ago

@eriknyk it's a totally different layout/design so not without some pretty heavy changes in the List component.

Or just some CSS and svelte magic!
https://svelte.dev/repl/9ad3e8e1878349da92fce768d45ee666?version=3.49.0

eriknyk commented 1 year ago

Hi @rob-balfre it is nice and useful for a static list.

Is possible to have a way to set a component in the noOptionsMessage instead a string? in that way we could set a button element to offer an action instead the default no options message.

Best Regards.

rob-balfre commented 1 year ago

Latest version of beta has some big changes, named slots for example. Might be handy for this. Thanks