Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select2 multiple select dropdown css issue #68

Open
RohitM-IN opened this issue Mar 16, 2021 · 3 comments
Open

select2 multiple select dropdown css issue #68

RohitM-IN opened this issue Mar 16, 2021 · 3 comments

Comments

@RohitM-IN
Copy link

RohitM-IN commented Mar 16, 2021

normally a dropdown should be like
image
and its like that but only when multiselect is off
but when multiselect option is on its like this:
image
image

<select name="teacher_id[]" class="form-control select2" multiple="true">
...
</select>

//js 
$.fn.select2.defaults.set( "theme", "bootstrap4" );
$('.select2').select2();

the list will increase to 60 or so it a search field is needed or else i would have disabled it

here is head include css i got from Admin lte 3 3.1.0-rc
https://pastebin.com/3DAWBYSx

these are all the css file i included but i dont think any of these are conflicting

  <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
  <!-- Google Font: Source Sans Pro -->
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="{{ asset("backend/plugins/fontawesome-free/css/all.min.css") }}">
  <!-- Ionicons -->
  <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
  <!-- iCheck -->
  <link rel="stylesheet" href="{{ asset("backend/plugins/icheck-bootstrap/icheck-bootstrap.min.css") }}">
  <!-- JQVMap -->
  <link rel="stylesheet" href="{{ asset("backend/plugins/jqvmap/jqvmap.min.css") }}">
  <!-- Theme style -->
  <link rel="stylesheet" href="{{ asset("backend/dist/css/adminlte.css") }}">
  <!-- overlayScrollbars -->
  <link rel="stylesheet" href="{{ asset("backend/plugins/overlayScrollbars/css/OverlayScrollbars.min.css") }}">
  <!-- Daterange picker -->
  <link rel="stylesheet" href="{{ asset("backend/plugins/daterangepicker/daterangepicker.css") }}">
  <!-- summernote -->
  <link rel="stylesheet" href="{{ asset("backend/plugins/summernote/summernote-bs4.min.css") }}">
  <!-- Select2  theme -->
  <link rel="stylesheet" href="{{ asset("backend/plugins/select2/css/select2.min.css") }}">
  <!-- Select2 bs4 theme -->
  <link rel="stylesheet" href="{{ asset("backend/plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css") }}">
  <!-- Bootstrap4 Duallistbox -->
  <link rel="stylesheet" href="{{ asset("backend/plugins/bootstrap4-duallistbox/bootstrap-duallistbox.min.css") }}">
  <!-- BS Stepper -->
  <link rel="stylesheet" href="{{ asset("backend/plugins/bs-stepper/css/bs-stepper.min.css") }}">
  <!-- icheck bootstrap  -->
  <link rel="stylesheet" href="{{ asset("backend/plugins/icheck-bootstrap/icheck-bootstrap.min.css") }}">
  <!-- datatables bootstrap  -->
  <link rel="stylesheet" href="{{ asset("backend/plugins/datatables-bs4/css/dataTables.bootstrap4.min.css") }}">
  <!-- Custom Css -->
  <link rel="stylesheet" href="{{ asset("css/wickedpicker.min.css") }}">
  <link rel="stylesheet" href="{{ asset("css/bootstrap-datetimepicker.min.css") }}"  />

I check it no other css are causing the error 🤔 except adminlte.css (Admin LTE v3 here) since its main theme of website
I also updated it to latest css version by replacing the code from repo

@RohitM-IN RohitM-IN changed the title select2 multiple select dropdown issue select2 multiple select dropdown css issue Mar 16, 2021
@chao-mu
Copy link

chao-mu commented Apr 7, 2021

Did you find a workaround for this? I suffer from the same isue.

@antoniosmgatto
Copy link

Did you find a workaround for this? I suffer from the same isue.

Me too. I found #67 that address the issue. Try to install from github or downgrade select2:

yarn add https://github.com/tagliala/select2-bootstrap4-theme#feature/refactor-as-custom-select

@Rikijs
Copy link

Rikijs commented Apr 24, 2021

yarn add https://github.com/tagliala/select2-bootstrap4-theme#feature/refactor-as-custom-select

Sadly, this command does not work on Windows 10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants