Anonymous2018
Anonymous2018

Reputation: 53

Customizing search box in ember powerselect

I want to add a search icon inside the Ember power-select input tab. I don't see any method so far to customize it. How do i do this?

Upvotes: 0

Views: 574

Answers (1)

jelhan
jelhan

Reputation: 6338

Ember Power Select is very flexible. You could pass in a custom component for nearly each of it's pieces. The search box is rendered by default by a component called power-select/before-options. This is determined by beforeOptionsComponent property of {{power-select}} component. Override that property on invocation to have total control over what is rendered before the first option. Ember Power Select provides quite a lot information to that component.

If possible I would consider styling the search box with CSS as this would be way less complex and does not add that maintenance burden.

Upvotes: 1

Related Questions