1
1
# ActiveAdmin Searchable Select
2
2
3
3
[ ![ 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 )
4
6
[ ![ Build Status] ( https://github.com/codevise/activeadmin-searchable_select.svg?branch=master )] ( https://github.com/codevise/activeadmin-searchable_select/actions )
5
7
6
8
Searchable select boxes (via [ Select2] ( https://select2.org/ ) ) for
@@ -15,6 +17,7 @@ Add `activeadmin-searchable_select` to your Gemfile:
15
17
gem ' activeadmin-searchable_select'
16
18
```
17
19
20
+ ##### Using assets via Sprockets
18
21
Import stylesheets and require javascripts:
19
22
20
23
``` scss
@@ -27,6 +30,39 @@ Import stylesheets and require javascripts:
27
30
/ /= require active_admin/ searchable_select
28
31
```
29
32
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
+
30
66
## Usage
31
67
32
68
### Making Select Boxes Searchable
0 commit comments