Skip to content

Commit

Permalink
ref: theme bootstrap-5 for select2
Browse files Browse the repository at this point in the history
  • Loading branch information
theus77 committed Feb 22, 2024
1 parent 8209242 commit 0889421
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 2 additions & 0 deletions EMS/admin-ui-bundle/assets/css/adminlte.scss
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
@import "./admin-lte/adminlte";
@import "select2/src/scss/core";
@import "select2-bootstrap-5-theme/src/include-all";
3 changes: 0 additions & 3 deletions EMS/admin-ui-bundle/assets/css/core/plugins/select.scss

This file was deleted.

7 changes: 2 additions & 5 deletions EMS/admin-ui-bundle/assets/js/core/plugins/select.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import $ from 'jquery'
import 'bootstrap-select'
import 'select2/dist/js/select2.full'
import 'bootstrap-select/sass/bootstrap-select.scss'
import 'select2/src/scss/core.scss'
import '../../../css/core/plugins/select.scss'
import 'select2/dist/js/select2';

class Select {
load (target) {
const query = $(target)
query.find('.select2').select2({
theme: 'bootstrap-5',
allowClear: true,
placeholder: '',
escapeMarkup: function (markup) { return markup }
Expand Down
1 change: 1 addition & 0 deletions EMS/admin-ui-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"jquery-lazyload": "^1.9.7",
"jquery-ui": "^1.13.2",
"select2": "^4.1.0-rc.0",
"select2-bootstrap-5-theme": "^1.3.0",
"sortablejs": "^1.15.1",
"uuid": "^9.0.1"
}
Expand Down

0 comments on commit 0889421

Please sign in to comment.