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

ng2-select.css is missing after installing with npm

Open grauschnabel opened this issue 8 years ago • 17 comments

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

grauschnabel avatar Sep 23 '16 18:09 grauschnabel

Same issue here

warapitiya avatar Sep 24 '16 11:09 warapitiya

Same here. There is no css file.

davidalee avatar Oct 06 '16 21:10 davidalee

it seems to be hard coded ... :( so hard to make my own styles.

grauschnabel avatar Oct 08 '16 12:10 grauschnabel

:( 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.

davidalee avatar Oct 08 '16 14:10 davidalee

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.

grauschnabel avatar Oct 08 '16 17:10 grauschnabel

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";

Avien avatar Oct 10 '16 08:10 Avien

Also having this problem. The file ng2-select/components/css/ng2-select.css seems to be missing from the package.

raaaste avatar Oct 20 '16 09:10 raaaste

confirmed with bootstrap 4 (adding dropdown styles solved the issue)

cortopy avatar Dec 22 '16 11:12 cortopy

adding dropdown styles solved the issue

Could you elaborate what exactly you did? Thanks!

dhilgarth avatar Feb 09 '17 09:02 dhilgarth

@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 avatar Feb 09 '17 21:02 GFoley83

@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 avatar Feb 16 '17 12:02 cortopy

@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

GFoley83 avatar Feb 16 '17 22:02 GFoley83

Thanks for the tag @GFoley83 :-)

dhilgarth avatar Feb 17 '17 13:02 dhilgarth

http://valor-software.com/ng2-select/assets/css/ng2-select.css

manish-jain-1 avatar Jun 13 '17 01:06 manish-jain-1

New life the component is there: https://github.com/optimistex/ng2-select-ex

optimistex avatar Feb 03 '18 23:02 optimistex

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 avatar Oct 23 '18 06:10 santhoshsakthivel

@santhoshsakthivel Just provide it into the component: image

optimistex avatar Oct 25 '18 21:10 optimistex