Reputation: 313
I seems to be unable to style the dropdown menu of the ng bootstrap typeahead.
Styles for the input itself is fine (the component only contains a input/typeahead) but nothing applies for the dropdown (tried using the ngb-typeahead-window thatget inserted as well as the .dropdown-menu class for that.
Upvotes: 2
Views: 6327
Reputation: 61
A great answer here: https://stackoverflow.com/a/51417049/4248983
tl;dr
encapsulation: ViewEncapsulation.None
in your @Component
decorator to allow your component styles to be accessed globallyWARNING
Setting ViewEncapsulation.None
will mean your component styles are available globally. Ensure your css selectors are specific enough to prevent impacting other elements in your application!
Upvotes: 5
Reputation: 199
ng-bootstrap is pretty limiting when it comes to changing its components. I'd say try using a template, that is the closest to customization you can come to. Plugins like ng-bootstrap and ngx-bootstrap are custom components that often don't support customizability to the extend that other plugins offer.
Upvotes: 2