ng2-select
ng2-select copied to clipboard
ng2-select.css is missing after installing with npm
Hi there,
The readme tells me to install the ng2-select.css but it is missing in my npm installation.... Please add it there,
Thanks, Martin
Same issue here
Same here. There is no css file.
it seems to be hard coded ... :( so hard to make my own styles.
:( you're missing the point @grauschnabel
The spirit of these comments/confirmations of a missing file are to help guide the repo towards completion, not to complain that there is no css file.
I was a bit ironic or sarcastic, sorry for that. Of course I think the css should be taken out of the components/select/select.ts file (where I think the ng2-select.css content is included) and be put to an extra css file for easy editing by anyone for his/her project.
You don't actually need the ng2-select.css because its based on bootstrap dropdowns.scss/less, Just import bootstrap into your scss and you're fine: @import "~bootstrap-sass/assets/stylesheets/bootstrap";
Also having this problem. The file ng2-select/components/css/ng2-select.css
seems to be missing from the package.
confirmed with bootstrap 4 (adding dropdown styles solved the issue)
adding dropdown styles solved the issue
Could you elaborate what exactly you did? Thanks!
@cortopy I'd like to hear how you solved that too. Did you have to import all of Bootstrap 4 or just the dropdown styles?
@GFoley83 I only use ng2-select
on Bootstrap projects. I only include what I need though. For Bootstrap 4 I'd try adding just the dropdown (and perhaps the grid?)
@cortopy Thanks for that. Tagging @dhilgarth as my answer may be relevant for you. I only wanted to use Bootstrap 3 for ng2-select
, not globally in my project. I was able to get it working by importing the following in the scss
file for the component I was using ng2-select
in:
:host ng-select /deep/ {
@import "~bootstrap-sass/assets/stylesheets/bootstrap";
}
I'm sure I could have just pulled in the specific stylesheets required e.g. _dropdown.scss
etc. but I actually scrapped using ng2-select
completely in favour of PrimeNG's autocomplete component:
http://www.primefaces.org/primeng/#/autocomplete
Thanks for the tag @GFoley83 :-)
http://valor-software.com/ng2-select/assets/css/ng2-select.css
New life the component is there: https://github.com/optimistex/ng2-select-ex
New life the component is there: https://github.com/optimistex/ng2-select-ex
Can you please explain how to set the default value in ngx-select-ex. You give an example and it is randomly choosing the value from the array. But I need to set a single value. So, please tell how to set the single default value.
@santhoshsakthivel Just provide it into the component: