Skip to content

Commit 3bd7ca0

Browse files
committed
Update init.js
1 parent b1a4928 commit 3bd7ca0

File tree

1 file changed

+4
-1
lines changed
  • app/assets/javascripts/active_admin/searchable_select

1 file changed

+4
-1
lines changed

app/assets/javascripts/active_admin/searchable_select/init.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
// to be passed to select2
88
var options = $.extend(extra || {}, item.data('searchableSelect'));
99

10-
// default option allow clear
10+
// default option allow clear (must have placeholder and allowClear to options)
11+
if (options.placeholder == undefined)
12+
options.placeholder = '';
13+
1114
if (options.allowClear == undefined)
1215
options.allowClear = true;
1316

0 commit comments

Comments
 (0)