11# ActiveAdmin Searchable Select
22
33[ ![ Gem Version] ( https://badge.fury.io/rb/activeadmin-searchable_select.svg )] ( http://badge.fury.io/rb/activeadmin-searchable_select )
4+ [ ![ NPM Version] ( https://badge.fury.io/js/@codevise%2Factiveadmin-searchable_select.svg )] ( https://badge.fury.io/js/@codevise%2Factiveadmin-searchable_select )
5+ ![ npm] ( https://img.shields.io/npm/dm/@codevise/activeadmin-searchable_select )
46[ ![ Build Status] ( https://github.com/codevise/activeadmin-searchable_select.svg?branch=master )] ( https://github.com/codevise/activeadmin-searchable_select/actions )
57
68Searchable select boxes (via [ Select2] ( https://select2.org/ ) ) for
@@ -15,6 +17,7 @@ Add `activeadmin-searchable_select` to your Gemfile:
1517 gem ' activeadmin-searchable_select'
1618```
1719
20+ ##### Using assets via Sprockets
1821Import stylesheets and require javascripts:
1922
2023``` scss
@@ -27,6 +30,39 @@ Import stylesheets and require javascripts:
2730/ /= require active_admin/ searchable_select
2831```
2932
33+ ##### Using assets via Webpacker (or any other assets bundler) as a NPM module (Yarn package)
34+
35+ Execute:
36+
37+ $ npm i @codevise/activeadmin-searchable_select
38+
39+ Or
40+
41+ $ yarn add @codevise/activeadmin-searchable_select
42+
43+ Or add manually to ` package.json ` :
44+
45+ ``` json
46+ "dependencies" : {
47+ "@codevise/activeadmin-searchable_select" : " 1.6.0"
48+ }
49+ ```
50+ and execute:
51+
52+ $ yarn
53+
54+ Add the following line into ` app/assets/javascripts/active_admin.js ` :
55+
56+ ``` javascript
57+ import ' @codevise/activeadmin-searchable_select' ;
58+ ```
59+
60+ Add the following line into ` app/assets/stylesheets/active_admin.scss ` :
61+
62+ ``` css
63+ @import ' @codevise/activeadmin-searchable_select' ;
64+ ```
65+
3066## Usage
3167
3268### Making Select Boxes Searchable
0 commit comments