Skip to content

Commit

Permalink
Fix TomSelect integration
Browse files Browse the repository at this point in the history
  • Loading branch information
kaka-ruto committed Nov 20, 2024
1 parent cee338d commit 9b930c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/madmin/application/_javascript.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
<%= stylesheet_link_tag "madmin/application", "data-turbo-track": "reload" %>
<%= stylesheet_link_tag "https://unpkg.com/flatpickr/dist/flatpickr.min.css", "data-turbo-track": "reload" %>
<%= stylesheet_link_tag "https://unpkg.com/tom-select/dist/css/tom-select.min.css", "data-turbo-track": "reload" %>
<%= stylesheet_link_tag "https://cdn.jsdelivr.net/npm/tom-select/dist/css/tom-select.css", "data-turbo-track": "reload" %>
5 changes: 3 additions & 2 deletions config/importmap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true
pin "trix"
pin "@rails/actiontext", to: "actiontext.esm.js"
pin_all_from Madmin::Engine.root.join("app/javascript/madmin/controllers"), under: "controllers", to: "madmin/controllers"
pin_all_from Madmin::Engine.root.join("app/javascript/madmin/controllers"), under: "controllers",
to: "madmin/controllers"

pin "tom-select", to: "https://unpkg.com/tom-select@2/dist/esm/tom-select.complete.js"
pin "tom-select", to: "https://ga.jspm.io/npm:tom-select@2.4.1/dist/js/tom-select.complete.js"
pin "tailwindcss-stimulus-components", to: "https://unpkg.com/tailwindcss-stimulus-components@5/dist/tailwindcss-stimulus-components.module.js"

0 comments on commit 9b930c5

Please sign in to comment.