solid-select icon indicating copy to clipboard operation
solid-select copied to clipboard

Since there is no grouping of option yet, can we insert arbitrary html in the name?

Open kevinelliott opened this issue 1 year ago • 6 comments

I'd like to have a TAG in front of the name of the results to indicate what kind of content it is, since there's no grouping yet. Is this possible?

kevinelliott avatar Feb 25 '23 23:02 kevinelliott

Yes, you can put arbitrary tags in the format option to control what's rendered. I'll try to add an example in the coming days (along with how groups can be emulated using disabled options and some custom styling).

martinpengellyphillips avatar Mar 01 '23 20:03 martinpengellyphillips

FYI I've added a grouping example to the demo site now - search for 'Grouping' in the select box. The main issue is that the group headers are included in the navigation - I think I will add something to the core to deal with that longer term (and possibly bundle the createGroupedOptions approach once tested more.

martinpengellyphillips avatar Mar 02 '23 13:03 martinpengellyphillips

Thanks, how can I use this with async?

kevinelliott avatar Mar 08 '23 03:03 kevinelliott

Screenshot 2023-03-07 at 7 45 03 PM

kevinelliott avatar Mar 08 '23 03:03 kevinelliott

@martinpengellyphillips Any thoughts?

kevinelliott avatar May 16 '23 01:05 kevinelliott

Did you try modifying the example to use createAsyncOptions helper?

martinpengellyphillips avatar Jun 27 '24 22:06 martinpengellyphillips