Tag: Vuejs
1 articles

Ruby on Rails 7 search selectbox with select2 and stimulus

Install select2 and jQuery yarn add select2 jquery Create select2 controller ```app/frontend/controllers/select2_controller.js import { Controller } from "@hotwired/stimulus" import $ from 'jquery'; import 'select2/dist/css/select2.min.css' import Select2 from "select2" export default class extends Controller { connect() { Select2() $('.select2').select2(); } } ``` app/frontend/controllers/index.js import Select2Controller from...
Created by Yuto at 2022-01-26 19:37