tedconf / ember-searchable-select

Data-down, actions up select-like menu with searching and tagging capabilities.
http://tedconf.github.io/ember-searchable-select/
MIT License
37 stars 15 forks source link

Enable hiding the search so that it is easier to style all dropdowns … #38

Closed janpe closed 8 years ago

janpe commented 8 years ago

…in an app to look the same even if they don't need to have search

janpe commented 8 years ago

The checks seem to fail randomly because of an npm bug.

brenna commented 8 years ago

Due to the complexity of the component and the fact that this isn't a real <select> menu, I don't recommend using a searchable-select where a vanilla <select>would suffice.

You can a select with options from scratch in Ember or use a simpler addon, then apply the relevant styles for consistency.

I can point you in the right direction for either option if needed.

janpe commented 8 years ago

Hi @brenna. My project uses searchable-select and I want all the non-searchable selects to have the same look and feel. If I use two different components I feel that there might be problems later on if the markup of styles of one of them is changed.

I'd be glad to hear your tips on this. Thanks!

brenna commented 8 years ago

Ember-x-select is a popular addon for generating regular select elements. You can see in the demo they render as default browser selects with standard HTML and no styling.

You could then add the CSS rules linked to above to your ember-x-selects or to achieve consistent styling.

Alternately, here is a good tutorial on building selects without an addon, which might be your best option if these are simple menus and you want full control of the markup. The same styling can also be applied here.

janpe commented 8 years ago

Aren't those two options both regular selects? I'm sorry but I missed the part on how I'll be able to make the opened dropdown look identical to the one on the searchable-select.

brenna commented 8 years ago

Ah, I see what you mean. You can't make the open dropdown look like a non-native select without using a non-native select, only the un-opened input. But I don't recommend replacing native HTML elements with non-semantic stuff just purely for aesthetics. You're free to do that in your own project but it's not a practice I wish to support as part of this addon.